diff --git a/defaults.toml b/defaults.toml index 3155b09..1e1e49b 100644 --- a/defaults.toml +++ b/defaults.toml @@ -47,11 +47,11 @@ max_area = 40000000 max_file_size = 40 [media.animation] -max_width = 256 -max_height = 256 -max_area = 65536 +max_width = 1920 +max_height = 1920 +max_area = 2073600 max_file_size = 40 -max_frame_count = 100 +max_frame_count = 900 [media.video] enable = true diff --git a/pict-rs.toml b/pict-rs.toml index 932f0c3..ca2f8ab 100644 --- a/pict-rs.toml +++ b/pict-rs.toml @@ -281,47 +281,37 @@ webp = 100 [media.animation] ## Optional: max animation width (in pixels) # environment variable: PICTRS__MEDIA__ANIMATION__MAX_WIDTH -# default: 256 -# -# If an animation exceeds this value, it may be converted to a silent video -max_width = 256 +# default: 1920 +max_width = 1920 ## Optional: max animation height (in pixels) # environment variable: PICTRS__MEDIA__ANIMATION__MAX_HEIGHT -# default: 256 -# -# If an animation exceeds this value, it may be converted to a silent video -max_height = 256 +# default: 1920 +max_height = 1920 ## Optional: max animation area (in pixels) # environment variable: PICTRS__MEDIA__ANIMATION__MAX_AREA -# default: 65,526 -# -# If an animation exceeds this value, it may be converted to a silent video -max_area = 65536 +# default: 2,073,600 +max_area = 2073600 ## Optional: max animation size (in Megabytes) # environment variable: PICTRS__MEDIA__ANIMATION__MAX_FILE_SIZE # default: 40 -# -# If an animation exceeds this value, it may be converted to a silent video max_file_size = 40 ## Optional: max frame count # environment variable: PICTRS__MEDIA__ANIMATION__MAX_FRAME_COUNT # default: 100 -# -# If an animation exceeds this value, it may be converted to a silent video -max_frame_count = 100 +max_frame_count = 900 ## Optional: set file type for all animations # environment variable: PICTRS__MEDIA__ANIMATION__FORMAT # default: empty # # available options: apng, avif, gif, webp -# When set, all uploaded still images will be converted to this file type. For balancing quality vs -# file size vs browser support, 'avif', 'jxl', and 'webp' should be considered. By default, images -# are stored in their original file type. +# When set, all uploaded animated images will be converted to this file type. For balancing quality +# vs file size vs browser support, 'avif', 'jxl', and 'webp' should be considered. By default, +# images are stored in their original file type. format = "webp" diff --git a/src/config/defaults.rs b/src/config/defaults.rs index d47ead0..fc4a0d2 100644 --- a/src/config/defaults.rs +++ b/src/config/defaults.rs @@ -261,10 +261,10 @@ impl Default for ImageDefaults { impl Default for AnimationDefaults { fn default() -> Self { AnimationDefaults { - max_height: 256, - max_width: 256, - max_area: 65_536, - max_frame_count: 100, + max_height: 1920, + max_width: 1920, + max_area: 2_073_600, + max_frame_count: 900, max_file_size: 40, quality: AnimationQualityDefaults {}, }