Back to Developer Roadmap

Image Format

src/data/best-practices/frontend-performance/content/choose-image-format-approprietly.md

4.01.1 KB
Original Source

Image Format

Choose your image format appropriately

To ensure that your images don't slow your website, choose the format that will correspond to your image. If it's a photo, JPEG is most of the time more appropriate than PNG or GIF. However, don't forget to look at the more modern formats that can reduce the size of your files. Each image format has pros and cons, so it's important to know these to make the best choice possible.

Use Lighthouse to identify which images can eventually use modern formats (like JPEG 2000m, JPEG XR or WebP). Compare different formats, sometimes using PNG8 is better than PNG16, sometimes it's not.