Images That Work Everywhere
Images are usually the heaviest thing on a page and the first thing a screen reader user misses. You will write alt text that helps, pick the right format and size, stop the page from jumping while it loads, and serve phones smaller pictures than big screens.
Updated
Images with Meaning
- Alt Text That Helps (Apprentice): Write alt text by what each picture is for, so a page still makes sense to someone who can't see its pictures, and add captions everyone can read.
- Clickable Regions of a Picture: Image Maps (Apprentice): Turn the parts of one picture into separate links with an image map, measure each clickable shape in pixels, and give the same links as text for everyone the map leaves out.
Fast Images
- Image Formats and File Size (Apprentice): Learn why a photo straight from your phone is far bigger than a page needs, and which file format fits each picture, from JPEG and PNG to SVG, WebP and AVIF.
- Image Dimensions and Lazy Loading (Journeyman): Stop a page from jumping while its pictures load with width and height, let pictures further down wait with loading="lazy", and give the first picture priority.
Responsive Images
- Responsive Images with srcset and sizes (Journeyman): Offer the same photo in several widths with srcset, tell the browser how wide it will be shown with sizes, and let each phone, laptop and sharp screen download the file it needs.
- The Picture Element (Journeyman): Use picture and source to offer smaller AVIF and WebP files with a JPEG backup, and to show phones a tighter crop of a photo than big screens get.
Exercise: Speed Up the Travel Blog
- Exercise: Speed Up the Travel Blog (Journeyman): Make a slow travel blog fast and friendly to screen readers, with alt text by purpose, width and height, lazy loading, srcset, a picture element and a clickable trip map, and measure the difference.