How to optimise video files for the web

How to Optimise Video for Your Website

Start with the job the video does. A product demonstration needs clear playback controls and captions. A background loop needs to stay out of the way of reading and navigation.

Export for the size people actually watch

Use a resolution that suits the player and review the result on a phone. Compare file size and visual quality at a few settings. Pick a poster frame that explains what the video is about and keep enough space for the player before it loads.

Decide how and when the video loads

For an optional clip, use a poster and let the visitor start playback. Consider an on-demand player for third-party embeds, especially where your site uses a consent banner. Give people controls to pause and add captions for speech and other meaningful audio.

Test the real playback experience

Try it on a slower connection, with sound off, at small widths and with a keyboard. Check whether playback competes with the first image or delays the next action. Our London web design team can help integrate video into a page that remains easy to use.

Read MDN’s video element reference