Automatable Defensive Core Image Compression With Imagemin Guard 4 (Now With No Imagemin)

Published on October 9, 2024, filed under (RSS feed for all categories).

A brief release note, Imagemin Guard was just updated to move away from the unmaintained Imagemin family, and to improve code, tests, documentation, and usability.

Why would this move away from Imagemin be important? Because it’s generally not helpful, and even poses a risk for everyone using a software, to maintain a piece of software whose dependencies are not being maintained—and that therefore is only half-maintained. The situation is much better now, with immediate dependencies all showing some form of a heartbeat.

Why would Imagemin Guard itself be interesting? Because it’s actually a pretty neat helper (fair enough, my words) to make sure all images are always compressed near-losslessly before independently doing further optimizations. There’s no reason to store and potentially ship images for which there’s a smaller version of comparable quality. (You can try Imagemin Guard out without setting up any automation by going to one of your projects and running npx @j9t/imagemin-guard.)

What if I’m selling snake oil here, or if anything goes wrong? First, if you’re using version control (which you certainly are), you can always revert. Then, for any issues—the update doesn’t introduce breaking changes but was substantial, so bear with me—, please report them.

For more information, check out the docs as well as past posts. Happy image(min)-guarding!

Was this useful or interesting? Share (toot) this post, become a one-time nano-sponsor, or support my work by learning with my ebooks.

About Me

Jens Oliver Meiert, on September 30, 2021.

I’m Jens (long: Jens Oliver Meiert), and I’m a frontend engineering leader and tech author/publisher. I’ve worked as a technical lead for companies like Google and as an engineering manager for companies like Miro, I’m a contributor to several web standards, 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. (Be critical, interpret charitably, and give feedback.)