The Image Compression Challenge (Donating Money for Excess-Free Projects)
Published on OctĀ 30, 2024 (updated NovĀ 27, 2024), filed under development (feed). (Share this on Mastodon orĀ Bluesky?)
Hereās a frontend challenge.
Navigate to your websiteās or main projectās repository, and run an image compression tool capable of losslessly and near-losslessly compressing PNG, JPG, GIF, WebP, and AVIF images over the repository.
If you donāt have or know of such a tool, open a shell on your machine, navigate to said websiteās or projectās repository, and run the following command (should I say āitās safeā!Ā *):
npx @j9t/imagemin-guard
(This takes care of lossless and near-lossless compression of the images in the folder. Perform this in a project under version control, to be able to diff-review the results and roll back if anything is not to your liking.)
If nothing is being compressed on the first run (or if you receive the message āDefensive base compression completed. You saved 0.00Ā KB.ā with Imagemin Guard), email me. (Iāll assume that the folder contained images, and that youāre reaching out after the first run.)
For every email stating that nothing was compressed, Iāll donate $1 to the United Nations Relief and Works Agency for Palestine Refugees in the Near East (UNRWA).Ā ā
For the compression results themselves, you can decide whether to keep the improvements, or to discard them. (If you like Imagemin Guard, you could also set up some automation.)
Why this challenge? Is it a promotion for Imagemin Guard? Yes and no. I do believe that Imagemin Guard is convenient and useful. I came up with the idea and have been driving the project after leaving sum.cumo in 2019. However, I also believe that thereās a high degree of acceptance of uncompressed images in our repos, many of which end up in production, unnecessarily wasting bandwidth and end user time. Thatās where you come in, to prove me wrong.
I will follow up on this challenge in four weeks, on November 27, 2024. Since Iām only asking for positive cases of nothing being compressed, I wonāt be able to learn how the situation really is out there. But you will, for your project(s). And thatās already cool.
As always, please share feedback. And if you like Imagemin Guard, keep using it, and help me make it better!Ā š
* I do say āitās safe,ā to the best of my knowledge, though I explicitly disclaim any responsibility or liability. If in doubt, review the package on Snyk Advisor (though offering limited insight due to limited usage), review the code yourself, or simply choose not to run it.
ā Since I have no idea how many people will participate and how many of their projects will be perfectly losslessly compressed, I will cap the donation at $250. (Depending on the outcome, I might still raise that cap.)
Update (November 27, 2024)
The way I designed the challenge, I cannot interpret the results. Of course, I kept my word.
About Me
Iām Jens (long: Jens Oliver Meiert), and Iām a web developer, manager, and author. Iāve been working as a technical lead and engineering manager for companies youāve never heard of and companies you use every day, Iām an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for OāReilly and Frontend Dogma.
I love trying things, not only in web development and engineering management, but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)