Side note: why can’t I find more of pictures of Kristi Noem from South park when I search. Everyone needs to share these images more. Make them as common as the Vance memes
I was trying to find the one of her face sliding around the ground
Side note: this is something I’m trying to figure out rn, but I know for certain that Lemmy gif uploads will fail if they are too wide. It’s unclear to me if non animated images will auto compress or fail when too big
So I actually kinda know what I’m talking about, but not really:
Lemmy uses pictrs to handle image uploads
I know from experience that pictrs will fail on gif upload if max width is greater than PICTRS_MEDIA_ANIMATION_MAX_WIDTH and same for height and (I think) animation frame count
I haven’t messed around with limits for image dimensions other than the settings for animated media, but I’m planning on testing this on my instance soon.
Lemmy API image upload
0.19.x has all images uploaded via the same API endpoint. So I think any image uploaded should be subject to the same dimension and size limits.
In the upcoming Lemmy v1 release, this might change as I believe they will have different upload endpoints for avatar, banner, post, etc. Avatars, for example, might be subject to smaller dimension limits. This is all subject to change as Lemmy v1 is not released yet.
Lemmy API getting the image upload limit settings
0.19.x does not expose the image upload limits via the API. So whatever, for example, lemmy.world set’s their limits to, there isn’t an easy way for a Lemmy frontend to look up those limits.
In the upcoming Lemmy v1 release, I believe they are planning on adding a way to look up these limits via the API.
Other limits
Lemmy imposes it’s own rate limits on how many images you can upload/time period. I wanna say the default is roughly 6 images/hour, but I might be totally wrong there.
I’m also curious how many sever admins leave the default settings, or change them.
TL;DR, what does this all mean?
Uploading gifs is always going to be a little annoying as they don’t auto compress. As a server admin, I just set the dimension limits higher so users encounter errors on fewer images
Non animated images, I’m guessing are automatically compressed on upload. Otherwise I suspect many more people would be complaining about failed uploads. But I’m working on verifying this
Just to be extra safe – and also here’s why I know all this – I’ve chosen to auto compress images on upload in my own Lemmy/PieFed frontend to 1mb and 1000 max width/height, whichever comes first. I’m actively testing these settings.
It’s less clear to me if static images get auto compressed on upload. Looks like pictrs implemented this a couple years ago, but I’m not sure if this is automatic behavior or has to be turned on by Lemmy admins.
Non animated images, I’m guessing are automatically compressed on upload. Otherwise I suspect many more people would be complaining about failed uploads. But I’m working on verifying this
There does seem to be options in pictrs to compress images by format, I’d assume that having these unset (default) would mean no compression happens. I think the reason there isn’t any complaining about image uploads happening is because, by default, they don’t have constraints applied to them. Only animation (256x256 dimension limit) and video (max 20 MiB file size) have constraints put on them in pictrs by default, though there is a 20 MiB upload limit set in nginx.
Lemmy imposes it’s own rate limits on how many images you can upload/time period. I wanna say the default is roughly 6 images/hour, but I might be totally wrong there.
I’m also curious how many sever admins leave the default settings, or change them.
feddit.uk has its set to 2 every 5 minutes. I think a previous admin set that, but it seems sensible enough.
I found plenty. I took a screenshot of a google search but it fails to upload in the comments here at the moment.
I was trying to find the one of her face sliding around the ground
Side note: this is something I’m trying to figure out rn, but I know for certain that Lemmy gif uploads will fail if they are too wide. It’s unclear to me if non animated images will auto compress or fail when too big
It could be up to each instance owner/sydamin. No idea.
So I actually kinda know what I’m talking about, but not really:
PICTRS_MEDIA_ANIMATION_MAX_WIDTH
and same for height and (I think) animation frame countTL;DR, what does this all mean?
Just to be extra safe – and also here’s why I know all this – I’ve chosen to auto compress images on upload in my own Lemmy/PieFed frontend to 1mb and 1000 max width/height, whichever comes first. I’m actively testing these settings.
There does seem to be options in pictrs to compress images by format, I’d assume that having these unset (default) would mean no compression happens. I think the reason there isn’t any complaining about image uploads happening is because, by default, they don’t have constraints applied to them. Only animation (256x256 dimension limit) and video (max 20 MiB file size) have constraints put on them in pictrs by default, though there is a 20 MiB upload limit set in nginx.
feddit.uk has its set to 2 every 5 minutes. I think a previous admin set that, but it seems sensible enough.
Thanks! I think I’m just going to upload progressively larger images to my instance and see where uploads fail lol.