Image
Dither
I was inspired by solar.lowtechmagazine.com, a site hosted by a PI and solar panels. It's important for them to be efficient with the site's content, so they compress the images with dithering and create a really unique image. So, I copied it and made it into a stand-alone function.
I use to have this little project hosted as a python script, but there is no need for it to be a server exeicuted script, so I made into a TS project.
You can view the code here on github, it's just a vite + ts setup.
Most of this script is written with co-pilot.