baker icon indicating copy to clipboard operation
baker copied to clipboard

Replaces unsupported `imagemin` with `sharp` + `svgo`

Open rdmurphy opened this issue 4 months ago • 0 comments

This PR purges imagemin and its plugins in favor of sharp and using svgo directly. Imagemin has been unsupported for a very long time now, and it is the sole source of every single warning you see when you run npm install. These changes will mean Baker now has zero known package vulnerabilities.

This depends on #1588 (and #1587) because sharp requires Node v18. sharp is much, much faster than imagemin ever was and is actively maintained. I kept the default optimizations very conservative in order to minimize drastic changes. Could humor the option of surfacing the configuration of sharp at a later time.

Oh, and it now supports .webp images!

rdmurphy avatar Feb 25 '24 00:02 rdmurphy