voyager icon indicating copy to clipboard operation
voyager copied to clipboard

PNGs are converted to JPEG on upload

Open bjoern-tantau opened this issue 9 months ago • 3 comments

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

  1. Create a new post or comment.
  2. Upload a png (preferably with transparency to see immediately if it worked)
  3. 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.

bjoern-tantau avatar Apr 16 '25 18:04 bjoern-tantau

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.

aeharding avatar Apr 19 '25 02:04 aeharding

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.

bjoern-tantau avatar Apr 19 '25 05:04 bjoern-tantau

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.

aeharding avatar Apr 19 '25 05:04 aeharding