diff options
| author | 2025-06-10 15:43:31 +0200 | |
|---|---|---|
| committer | 2025-06-10 15:43:31 +0200 | |
| commit | d7f967cbb599c64d18fe951d1725bf3050597dda (patch) | |
| tree | 061a302732684980e3dbf3f1a6012f3cbef01e26 /internal/media/processingmedia.go | |
| parent | [chore] Update interactionPolicy sub-policy parsing in line with documented d... (diff) | |
| download | gotosocial-d7f967cbb599c64d18fe951d1725bf3050597dda.tar.xz | |
[feature] configurable maximum thumbnail dimensions (#4258)
- adds configuration for thumbnail maximum dimensions with warning on exceeding recommendations
- moves the media configuration vars into their own sub-struct
- replaces the configuration flag funcs with simple string consts
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4258
Reviewed-by: tobi <kipvandenbos@noreply.codeberg.org>
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/media/processingmedia.go')
| -rw-r--r-- | internal/media/processingmedia.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/media/processingmedia.go b/internal/media/processingmedia.go index a1305f104..0bb145a02 100644 --- a/internal/media/processingmedia.go +++ b/internal/media/processingmedia.go @@ -25,6 +25,7 @@ import ( "codeberg.org/gruf/go-kv" "codeberg.org/gruf/go-runners" + "code.superseriousbusiness.org/gotosocial/internal/config" "code.superseriousbusiness.org/gotosocial/internal/gtserror" "code.superseriousbusiness.org/gotosocial/internal/gtsmodel" "code.superseriousbusiness.org/gotosocial/internal/log" @@ -225,6 +226,7 @@ func (p *ProcessingMedia) store(ctx context.Context) error { if width > 0 && height > 0 { // Determine thumbnail dimens to use. thumbWidth, thumbHeight := thumbSize( + config.GetMediaThumbMaxPixels(), width, height, aspect, |
