Png converts to Jpg no matter what!

So we messed up our “manifest icon” a while back and now we are unable to upload a PNG file to fix our API problem.

Whenever I upload a Png it auto converts it to Jpg.

I have tried all three of these settings in hopes of finding a solution but nope… Nothing seems to work!

What am I doing wrong?

Here’s our forum if it helps: https://community.morphmarket.com/

2 Likes

This comes up from time to time. There are many times when something is a png for a reason.

3 Likes

I actually want to use PNG… It just won’t allow me.
Is there a way to stop the conversion?

1 Like

Use TinyPNG to reduce the size of the PNG icon will fix the problem.
I have the same problem before, I spent hours to debug and searched for solution. Finally I found out that it was caused by the size of the icon. Reduce the PNG size (by reduce resolution or bit depth) will fix the problem.

3 Likes

The settings from your screenshot look correct. I’m fairly sure that if you copy/paste a PNG image into the editor, Discourse automatically converts it to a JPG. If that’s how you have been adding the image, try using the editor’s upload button to add the image and see if that makes a difference.

I don’t think the image preview jpg quality setting is relavant to the issue, but both the png to jpg quality and recompress original jpg quality settings need to be set to 100 to prevent PNGs from being converted to JPGs. Questions about conversion of PNG images have come up a few times. It would be good to find a way to make the settings that control this behaviour more obvious.

3 Likes

If you’d like to check in a copyedit to the setting descriptions that makes this clear, that’d be great! WARNING: mostly-lossless PNGs take many times more storage space than lossy JPGs.

3 Likes

I’ll give it a shot and report back! Thank you for the suggestion.

Sorry I should have been more clearer, this is the button I am using to try and change the icon:

2 Likes

Thanks for the details. We probably shouldn’t ever convert PNGs to JPGs when uploading site settings images.

6 Likes

It worked :tada::tada::tada:
Thank you so so much!

There may be a reason for it being the way it is. It was a pain in the :racehorse:, but we got there in the end.

Thank you for all of your help and suggestions everyone :blush:

3 Likes

I agree with this, @techAPJ is this a change you can make? Appears to have happened to quite a few admins already.

6 Likes

FYI (I’m with Thomas) regarding our use case – this has never been an issue for us except recently, because this JPG broke our PWA (as discussed here).

1 Like

Done via:

https://github.com/discourse/discourse/commit/64d2f260a98b0bdc95a2c1290d8f68f8270b40b5

5 Likes

Thanks. This was really helpful! :heart_eyes:

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.