Images
Use images to support written content and help users understand information.
Images can include photographs, illustrations, charts, diagrams and icons.
Avoid using images as decoration or to add colour. Only use an image if there is strong evidence that it meets a user need.
Make sure any information contained in an image is described in text. This helps someone who cannot see the image to understand the information using assistive technology. Also consider partially sighted users and the technologies they might use.
Refer to guidance on writing alt text.
When to use images
Most pages do not need images. Focus on writing clear, simple content for your page or form first.
Sometimes you may need images to support written content or to help users understand information differently. These images usually fall into one of 2 categories:
informative
decorative
Informative images can be useful to show what something looks like or how to find something. For example, when giving instructions such as taking a passport photo.
Use decorative images sparingly. You might use them on a homepage to support branding or for a campaign when there is a need to humanise content and create warmth or empathy. For example, Fostering.
Avoid using decorative images on guidance pages. Most people visit our websites to complete a specific task and this will slow them down. Research shows how decorative images are ignored when used alongside guidance.
Any images must only supplement written content. All essential information must be available in writing so that users who cannot see the image are not excluded.
Photography
Use photography when it’s important to show a lifelike representation of something or give a clear sense of place. For example, showing a real service or location.
Do not use photography to represent abstract concepts, for example, ‘innovation’ or ‘community’. Avoid using generic stock photography.
If you need to show people, think carefully about how you represent your users. Use realistic settings and do not only show one kind of person. For example, only depicting people of a particular age, gender or ethnicity can exclude people and reinforce negative stereotypes.
Aspect ratio
The aspect ratio for photographs should be 3:2. This refers to the shape of the image and the ratio between width and height.
If your image represents something physical, such as a letter, document or credit card, you should use the aspect ratio of that item.
Illustrations
Use illustrations to show a simplified image of something complex. For example:
to demonstrate a physical interaction, like scanning a passport
to help users find something on a document, like a reference number
Creating illustrations
Use as few visual elements as possible to communicate your message.
Start by following the guidance on colour and use our colour palette.
If you need more colours, try to use tints of the colour palette.
Use flat blocks of colour. Avoid using shadows or gradients, except when needed to show a distinctive feature of an object or to communicate layering or depth.
If you’re creating multiple illustrations, use consistent colours, line widths and border radiuses across them all.
Avoid depicting people in illustrations. Using photographs of real people and services will feel more authentic.
Images of text
Generally, avoid using images that contain any sort of text.
It’s usually unnecessary to use an image to merely show some text (known as an ‘image of text’). Give the information as written content instead.
Examples of unnecessary ‘images of text’ include images that show:
the contents of a post from social media
an excerpt from a document
key facts from a slide presentation
It’s okay to use an image that just happens to have text in it. For example, a photo of a library which includes book covers and signs in the background.
Logos
Logos are a rare example of when you can use images of text (known as logotype). Include the text featured within an organisation's logo in the image's alt text.
Follow brand guidelines when using logos and maintain accessibility standards, such as colour contrast.
Icons
Avoid using icons in most cases. People can understand a single icon to mean different things, so they can be confusing.
Only use icons when there is enough research showing that an icon is widely understood to mean what we intend it to.
Icons work better with a text label. Using icons on their own requires the user to think more, especially if the icon is unfamiliar to them.
Do not use a single icon to represent more than one thing. For example, the search icon (magnifying glass) should only be used for search functionality, and not also for screen magnification.
Make sure any icons and images used in links are at least 24px by 24px in size, with adequate spacing. This is to make sure users can easily interact with the link. This relates to WCAG 2.2 success criterion 2.5.8 Target size (minimum).
Charts and diagrams
If you use an image of a chart or diagram, the image should be followed by at least one of the following:
a description of the chart in the body text, directly under the image
a table of the raw data
a link to the raw data in an accessible file
You need to explain what is happening in the data and any important trends. You must write complex information contained in the image within a longer text description.
Consider if you can provide the same information just as effectively using a table or other text-based options.
Alt 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.
All images, except decorative images, must have alt text that:
tells people what information the image provides
describes the content and function of the image
is specific, meaningful and concise
Use normal punctuation, like commas and full stops, so the text is easy to read and understand.
Do not:
include the name of the photographer or person who created the image
start with ‘Image of’, ‘Graphic of’ or ‘Photo of’
repeat information from the page
include extra information not in the image
Some images do not need descriptions. For example, if the image is:
being described in the body copy (additional alt text will cause ‘auditory clutter’ for screen reader users)
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
When the alt text field is not filled, websites should provide an empty alt tag (alt="").
Use the Web Accessibility Initiative alt decision tree to work out if the image needs alt text.
Captions
Captions are optional. Use them to give context to an image at a glance or while a user is scanning the page.
You can use a caption to:
label a graph, infographic or diagram
name a person in a photo
Do not use the caption to describe your image or include essential information, instead of putting it in the body or alt text. Some screen readers do not read captions when the ‘Alt text’ field is empty.
If you do not need a caption, do not include one.
Optimise your image
Large image files slow down your page and use more energy. Before uploading, make sure your images are the right size and optimised for the web.
You can use free tools to resize and optimise your image, such as Squoosh.
Aim for a file size under 500kb.