Minifying Images on the Command Line
When I put images on this blog, I try and manage down the file sizes so browsers aren’t having to load multi-megabyte images for no reason. Since I use Jekyll and a very simple setup of static files with minimal processing tools, I need to do this manually. For years when I wanted to optimize an image file quickly, I’d upload to TinyPNG and redownload the shrunken version. Super simple.
But I wanted a way to do this on the command line rapidly, and to be able to write scripts to batch process images if I need to...