How to get image optimization right
It comes up on almost every project, usually later than it should. The short answer to image optimization is that it is mostly a sequence of small decisions, not one big one.
Speed is a feature people notice only in its absence, and then they leave rather than complain. Doing this properly once is usually cheaper than doing it approximately three times.
Why this earns attention
Images are usually the largest thing on a page. That sounds obvious written down. It is still the thing most often skipped. Write the reasoning down alongside the decision, because the reasoning is what changes first.
The steps
- Establish what you have today before changing anything
- Modern formats cut file size substantially at the same quality
- Serving a 3000px image into a 400px slot is pure waste
- Write down the decision so the next person does not re-litigate it
Serving a 3000px image into a 400px slot is pure waste. Small and consistent beats large and occasional here. Most teams find the first pass takes an afternoon and the maintenance takes minutes a month.
A reasonable first step
In practice
Real-world numbers from actual visitors matter more than a score produced on a fast laptop. Three things worth confirming about image optimization before you move on:
- Someone can say what the current setup is without going to look
- Modern formats cut file size substantially at the same quality — and you know whether that is true here
- There is a way to tell whether the last change to this helped
Worth checking on your own setup before it becomes someone else's problem to fix.