Some uploaded jpeg images get corrupted

Hello. Some of uploaded images turn into bright vertical thin stripes after upload.

It happened to jpeg uploads I did as embeds/previews for my KDE Wallpaper Competition entry.
This one ~
I fixed it via uploading png instead, but this is not ideal.

I also found another entry which shows same artifacted jpegs.
Here ~
As of time of writing, these are still present, user seem to not notice.

However, I am fairly confident that these jpegs can be seen by others, not just in my browser.
I downloaded the top image from user’s post with just wget, and opened with 2 different image viewers and thin colorful lines were also present in both.

I converted my images from png into jpeg via cjpeg (specifically, one which is mozjpeg) -quality 90. This detail may be important since at 90 quality mozjpeg switches to 4:4:4 chroma subsampling. Or in other words, both color and brightness information is fully retained. Usually jpegs are 4:2:0 subsampling, or in other words, color information is stored at half resolution and brightness at full resolution (human eyes are more sensitive to brightness).

Here’s a zip file with all 4 of mine (these turned into stripes upon uploading into my post there)…

From my browser history I also found one of them in corrupted state on cdn of this site…
…I have no idea if this was dark or light version of the tall jpeg of mine. It’s red stripes now. o_o

Speaking of browser I use. It is plausible that this problem specific to LibreWolf. Since uploading images to Squoosh (in-browser image optimizer, can be found on github) via LibreWolf makes similar artifacts instead of images in it. Albeit, there it happens for all files (png too).

Hm. Post preview also shows these stripes. And indeed, while LibreWolf shows 'em in preview of this post (to the right), ungoogled-chromium, does not. This suggest that problem is browser-specific. Or rather, appears in a specific browser and this site, since uploading these jpeg images into in-browser Discord works just fine.

Resolution may also play role. I tried a small jpeg image (same settings) and it didn’t get corrupted. Does LibreWolf botches resizing of jpeg images here or something? Well, I don’t know. I don’t do code. And hence, I just report this problem, here, for more competent people to look at. Since this problem seems, while rare, an important one. Corruption of image uploads is no fun. =/

As a LibreWolf user, yes this is a problem with LibreWolf. It seems at some step, Discuss uses the HTML5 canvas to do something and that’s the browser refusing access to the canvas data, hence the corruption. See the FAQ entry for this issue: Frequently Asked Questions – LibreWolf

1 Like

Alright. Thank you very much for the explanation!

Now - I should mark your comment as solution and write under “WALLPAPERS from a newbi” that their upload is corrupted (possibly due to LibreWolf) - is this correct?

Yes, and ask if they have any other extensions installed that could cause this (like CanvasBlocker)

1 Like