From d7f967cbb599c64d18fe951d1725bf3050597dda Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 10 Jun 2025 15:43:31 +0200 Subject: [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 Co-authored-by: kim Co-committed-by: kim --- internal/media/processingmedia.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/media/processingmedia.go') 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, -- cgit v1.2.3