this post was submitted on 05 Mar 2025
6 points (100.0% liked)

Lemmy Administration

708 readers
2 users here now

Anything about running your own Lemmy instance. Including how to install it, maintain and customise it.

Be sure to check out the docs: https://join-lemmy.org/docs/en/administration/administration.html

If you have any problems, describe them here and we will try to help you fixing them.

founded 4 years ago
MODERATORS
 

Disclaimer: I'm not an instance admin, just a user. I hope it's okay to post here.

Problem

I had several photos which wouldn't post for some reason. After poking around a bit, I found out that my home server has an upload size limit of 5 MB.

Now, an upload size limit is perfectly reasonable. Storage is expensive, and Lemmy is primarily designed for link aggregation and discussion, not file hosting.

However, the way Lemmy currently behaves when it encounters a large file is not ideal, and varies depending on the app/UI.

At best, you get a cryptic error message like {"data":{"msg":"Exceeded maximum dimensions","files":null},"state":"success"} or {"data":{"files":null,"msg":"Too many pixels"},"state":"success"}, and at worst, your webpage/app stalls for an indefinite amount of time.

Solution?

Obviously, it would be prudent to improve the comprehensibility of the error messages, but if there were a way to automatically compress large images to below the size limit, that would eliminate the error messages in the first place.

I believe most instances use Pict-rs to host images, is that correct?

I came across these discussion threads in the Lemmy and Pict-rs source code repositories:

Has anyone implemented automatic image compression on their Lemmy instance? If so, would they be willing to share their methods with other instance admins?

This feature would make things smoother for users, especially for new users who might not be aware of the upload size limit and just think "Lemmy doesn't work, I guess I'll go back to Reddit".

you are viewing a single comment's thread
view the rest of the comments
[–] nutomic@lemmy.ml 5 points 1 week ago (2 children)

Lemmy 1.0 will have automatic resizing for uploaded avatars and banners. Based on your post I also added some more config options to resize other uploads (for post images and markdown embeds). As well as options to disable video/animation uploads.

https://github.com/LemmyNet/lemmy/pull/5483

[–] ademir@lemmy.eco.br 3 points 1 week ago

Awesome!! Thank you so much!

Based on your post I also added some more config options to resize other uploads (for post images

Wow thanks, that's awesome!