Automatable Defensive Core Image Compression With Imagemin Guard 4 (Now With No Imagemin)
Published on Oct 9, 2024, filed under development (feed). (Share this on Mastodon or Bluesky?)
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!