How to Use Images Well on a Website

Start with what each image needs to show. A product photo may need detail and several angles. A decorative background can be smaller and simpler. Use a crop that preserves the subject at the width where visitors will see it.

Match the file to the purpose

Export photos at sensible dimensions and quality. Consider modern formats where your workflow supports them. For simple icons or logos, a vector file may remain sharp at different sizes. Keep the original so you can create new crops later.

Make important images accessible

Describe the information an image adds. Use an empty alternative where the image is decorative and surrounding text already communicates the point. If an image is the only content of a link or button, describe the action or destination.

Check how the page loads

Provide suitable responsive sizes and reserve space so the layout does not jump. Test that the main image appears early enough, and inspect what the browser downloads on a phone.

Google’s guide to responsive and accessible images