A little CLI that takes a URL as an argument and outputs the original size of the image and an optimized base64 string that represents it. I made it just for testing purposes. It optimizes PNG and JPEG images using the pngquant and jpegtran algorithms respectively. From now on, this will be the code I use when I make my image previews, be it automatically or manually.
mrnkr/preview-maker
A little CLI that turns images from a URL into optimized base64 strings
TypeScript