Check a local image against a 64-pixel display slot
Admin ·
An image can fit a byte ceiling but still be larger than the chosen display slot needs. Compare file size, format and geometry separately.
Set the display slot and budget
Select Load example and Check image optimization. The example uses a 64 × 36 CSS-pixel slot at device pixel ratio 2. Multiplying each side by 2 gives 128 × 72 device pixels, and the per-image byte ceiling is 1,000 bytes.
The PNG meets the byte budget. Both its sides are 2.5 times the requested device dimensions. Compare a smaller candidate for this slot.
| Sample | Saved bytes | Header evidence |
|---|---|---|
| dispatch-card.png | 806 | 320 × 180 PNG |
| dispatch-photo.png | 5,131 | JPEG stored as 180 × 240, displayed as 240 × 180 |
Check the JPEG’s suffix and aspect ratio
The JPEG exceeds the budget by 4,131 bytes. Its PNG suffix disagrees with the signature. The orientation points to a different displayed width and height than the stored values.
The displayed shape differs from the slot’s aspect ratio. Decide how to crop or reserve space before testing a new encoding. The report flags large axis ratios at 1.5× and aspect differences above 5%.
Save the findings and compare a replacement
Download image-optimization.json to retain your budget, slot, device ratio and each file’s measured values. Repeat with the proposed replacement under the same assumptions.
This is a local file and header audit. A page may choose other responsive candidates or use different compression in transit. Measure request timing and browser selection separately when reviewing page performance.
Common questions
Do I need a slot height?
No. Leave height blank to compare width alone. An aspect ratio comparison needs both dimensions.
How should I treat a TIFF proposed for web delivery?
The report suggests comparing a browser-oriented format. Check required color, alpha and page or frame behavior before replacing it.