Introduction
Avoid unnecessary decoration. Only use images if there is a real user need.
Aspect Ratio
The aspect ratio for photographs should be 3:2.
For illustrations or representative imagery, if the image represents something physical, such as a letter, document or credit card then this aspect ratio should be used.
Alternative text
Alternative text, or alt text, is read out by screen readers or displayed if an image does not load or if images have been switched off.
DO | DON'T |
---|---|
|
|
Some images do not need descriptions. Use alt="" if the image is:
- Decorative and does not include important content.
- An icon that has a text label that the alt text would repeat.
- Used in a link and the image is not needed to understand the link.
Use the Web Accessibility initiative alt decision tree to work out if the image needs alt text.
Avoid images that contain text, especially PNGs and JPGs as the text becomes unreadable when the user zooms in. If the image does contain text, use the SVG format as it remains readable when the user zooms in. The alt text should be the same as the text displayed in the image.