MarcP
(MarcP)
March 16, 2023, 12:32am
1
I have noticed that some image uploads always convert to jpeg, this creates ugly situations with images with transparent elements and dark/light mode. I couldn’t find a setting for this, can we somehow turn this off?
I’ve tried uploading an image in webp, png and it always converts it to jpg, how so?
2 Likes
piffy
March 16, 2023, 1:15am
2
I’ve had this issue. I believe if you turn the compression off in the settings, it will upload properly. Not an idea place to leave that setting though for obvious reason
mattdm
(Matthew Miller)
March 16, 2023, 9:46am
3
There are several settings which seem relevant:
recompress original jpg quality
(“Quality of uploaded image files (1 is lowest quality, 99 is best quality, 100 to disable).”)
png to jpg quality
(“Quality of the converted JPG file (1 is lowest quality, 99 is best quality, 100 to disable).”)
composer media optimization image encode quality
(“JPEG encode quality used in the re-encode process.”)
I am not sure how the last one relates to the first two — or what happens to webp or other file types that aren’t PNG or JPEG.
(Also, note for any Discourse UX people reading this: inconsistent use of JPEG and JPG makes this harder to find.)
3 Likes
Falco
(Falco)
March 16, 2023, 2:12pm
4
Last one is about Faster (and smaller) uploads in Discourse with Rust, WebAssembly and MozJPEG | Blog while the first two are about a server-side image optimization pipeline, so while both are about images they aren’t about the same feature.
1 Like
mattdm
(Matthew Miller)
March 16, 2023, 2:52pm
5
Let me rephrase.
I can see several separate concerns:
page load time / viewer bandwidth
server-side storage
server load / performance
upload speed
image quality
case one: diagrams, line drawings, etc., where JPEG compression is ugly and inefficient
(theoretical) case two: a photography forum where other concerns are not as important as preserving the image
… and I am unclear on how exactly the available settings impact these, especially with that new feature.
sam
(Sam Saffron)
March 22, 2023, 5:49am
7
First 2 are server side only changes. (that can run regardless of client side support)
Last one is applied in the browser and means that you end up sending smaller payloads to the server.
1 Like