I've been writing a lot about images on the web lately, but I haven't mentioned PNG format, or when PNG might be a better alternative to its lossy counterparts. Because PNG is a lossless format, it holds up much better to being scaled up, decoded/re-encoded, and modified, so it's worth taking a look at.
What is the best way, objectively, to reduce the file size of a JPG image for the web? Let's get scientific today, and do some quantitative testing.
If you care about web performance, please stop using gifs for animations on your website. Heck, even Giphy, the largest gif library in the world, serves gifs as MP4 files. Actual GIF format is their last possible fallback.