HTML & CSS · Middle · Question 49 of 75
Which image format usually gives the best compression for photos in modern browsers?
- 1BMP, because it stores pixels without quality loss
- ✓Correct answer: AVIF or WebP, with a JPEG fallback if needed
- 3PNG-24, because it's lossless and supports alpha
Explanation
AVIF and WebP weigh noticeably less than JPEG at the same quality. Lossless PNG is for graphics with transparency and sharp edges, but it's huge for photos. BMP isn't compressed at all. SVG is better for icons and logos. Fallbacks are done with <picture> or automatically by a CDN/optimizer (e.g. next/image).