PNGs are converted to JPEG on upload
Describe the bug
When I upload a png file, either as a post image or an inline image it is converted to jpg.
To Reproduce
- Create a new post or comment.
- Upload a png (preferably with transparency to see immediately if it worked)
- Save post or comment.
Expected behavior
Image is rendered as a png with transparency.
Smartphone (please complete the following information):
- Device: Fairphone 3
- OS: Android 13
- native App
- Version: 2.30.1
Additional context
I saw this already with 2.29.0, maybe a version or two earlier. If I recall correctly it did work before that.
Uploading PNGs via Lemmy's web interface works.
Hi! It should only convert if the upload would fail otherwise (more than 1mb). Some instances have limit set higher. So if you let me know your instance I can configure a specific limit before the optimization logic kicks in.
My instance is swg-empire.de. It allows unlimited uploads.
Personally I would always have that be handled by the server. Each one is different and has their own limits set. I think a nice error message would be more transparent for the user.
You may want to thumbs up and follow the following issue: https://github.com/LemmyNet/lemmy/issues/5322 If lemmy exposed upload limit, then your instance would never trigger Voyager's compression.
Compression logic will remain in Voyager to prioritize ease of use for normal users.