Distorted images when uploaded to Kiwifarms (solution) - Image uploaded showing as purple, green, etc lines of colors, what to do?

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.

We Are The Witches

True & Honest Fan
kiwifarms.net
Joined
Feb 23, 2019
So I see this still being a problem for some users who use Tor, and that is that when they upload an image, it ends up showing as a pattern instead of the actual image (can be green, yellow, etc):

image_1.webp

This is because of the canvas-fingerprint-protection feature, which adds a level of privacy to the user. Now Null has stated that the website does not browse fingerprint, so you may choose to disable that for Kiwifarms, it's up to you. Yet you still don't need to do this, so let's talk about the main ways to be able to upload images properly.
null.webp

* * * * * * * * * * * * * * * * * *

Converting the image to .webp yourself

When you upload an image, the forum now converts it to WEBP if it's in another format (except GIF, and maybe others), and that process is what causes this fingerprint issue, only when using the "Attach files" method. So one way to bypass this is to convert the image yourself, prior to the upload.

The are converters online, but one way to do it fast is with a .bat file if you're on Windows, by executing FFmpeg (if you don't have this program/tool, you should). The file could simply have this line, which at current directory takes all images with those extensions and creates a copy with the WEBP format:
Code:
for %%F in (*.jpg, *.png, *.avif) DO ffmpeg -i "%%~F" "%%~nF.webp"

Disallowing canvas fingerprinting protection

Another way is with the icon that appears once you try to upload an image to the forum (that is not WEPB or GIF), but you may also do in the browser's configuration, although I don't recommend it. Click on it (reads: "Manage canvas extraction permission") and allow it, then future uploads in that session should not have this issue.

allowed.webp


Using "Insert image"

Apparently, when you use the "Insert image (Ctrl+P)" option, the conversion does not cause canvas issues, so you may also try this instead:

insertimage.webp
 
When I saved this image it looked kind of messed up but now that it’s uploaded it looks fine
Converted GIFs don't face the canvas issue on Kiwifarms from my understanting.

About what you're saying, I am not sure, but it's curious because I converted that image back to a GIF, and those patches are not visible anymore, everything is fine. It's probably due to the WEBP compression; also notice that the patches don't affect much the moving area/the guy, so if I had to guess, it's a compression issue (that can be reverted).
How come the webp conversion sometimes increases jpg and png file size?
I am not sure, it could depend on a bunch of factors, such as that PNG already being optimized, but I'm not sure. This is a link to what WebP is, how it works, etc, by developers.google. You have FAQs, compression techniques, etc to review.

Specifically for what you mention:
https://developers.google.com/speed/webp/faq#can_a_webp_image_grow_larger_than_its_source_image
lossy.webp
 
Back