1024px banner

This commit is contained in:
Felix Ableitner 2025-01-09 16:41:44 +01:00
parent 96cf01751b
commit f04da5eb53
2 changed files with 6 additions and 14 deletions

View file

@ -66,13 +66,9 @@
max_thumbnail_size: 512 max_thumbnail_size: 512
# Maximum size for user avatar, community icon and site icon. # Maximum size for user avatar, community icon and site icon.
max_avatar_size: 512 max_avatar_size: 512
# Maximum size for user, community and site banner. # Maximum size for user, community and site banner. Larger images are downscaled to fit
# # into a square of this size.
# TODO: Unfortunately pictrs can only resize images to fit in a*a square, no rectangle. max_banner_size: 1024
# Otherwise we have to use crop, or use max_width/max_height which throws error
# if image is larger.
# TODO: whats a sensible default here?
max_banner_size: 512
# Prevent users from uploading images for posts or embedding in markdown. Avatars, icons and # Prevent users from uploading images for posts or embedding in markdown. Avatars, icons and
# banners can still be uploaded. # banners can still be uploaded.
image_upload_disabled: false image_upload_disabled: false

View file

@ -109,13 +109,9 @@ pub struct PictrsConfig {
#[default(512)] #[default(512)]
pub max_avatar_size: u32, pub max_avatar_size: u32,
/// Maximum size for user, community and site banner. /// Maximum size for user, community and site banner. Larger images are downscaled to fit
/// /// into a square of this size.
/// TODO: Unfortunately pictrs can only resize images to fit in a*a square, no rectangle. #[default(1024)]
/// Otherwise we have to use crop, or use max_width/max_height which throws error
/// if image is larger.
/// TODO: whats a sensible default here?
#[default(512)]
pub max_banner_size: u32, pub max_banner_size: u32,
/// Prevent users from uploading images for posts or embedding in markdown. Avatars, icons and /// Prevent users from uploading images for posts or embedding in markdown. Avatars, icons and