Encyclopedia / Assets

Images

Usually the heaviest part of a page.

Use AVIF or WebP for photos and SVG for icons and logos. Size each image to how it's displayed, set width and height so the layout doesn't jump, and add loading="lazy" to images below the fold. Every image needs alt text, or alt="" if it's purely decorative.

<img src="/work/cover.avif" width="1200" height="630"
     alt="Dashboard showing weekly signups" loading="lazy">

Related terms

Performance Accessibility (a11y) SVG

More in Assets

Images, fonts, icons and files the page pulls in.

SVG Favicon & app icons

Open in the interactive encyclopedia →