Jens Oliver Meiert

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

Published on Oct 9, 2024, filed under , , . (Share this post, e.g. on Mastodon or on Bluesky.)

This is one of 180 articles that you can also read in an ebook: On Web Development II.

A brief release note, Image 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 Image 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 Image Guard out without setting up any automation by going to one of your projects and running npx image-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!

About Me

Jens Oliver Meiert, on March 2, 2026.

I’m Jens (long: Jens Oliver Meiert), and I’m an engineering lead, guerrilla philosopher, and indie publisher. I’ve worked as a technical lead and engineering manager for companies you use every day (like Google) and companies you’ve never heard of, 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 with respect to politics and philosophy. Here on meiert.com I talk about some of my experiences and perspectives. (Please share feedback: Interpret charitably, but do be critical.)