Image SEO: Alt Text, File Names, and More
Images can bring visitors from image search and make pages more useful, but only if search engines can understand them. Image SEO is mostly a matter of good habits: describe your images, name them properly, and keep them light.
Write meaningful alt text
Alt text is a short description in the image's HTML. It is read aloud by screen readers and shown if the image fails to load. Search engines use it, along with the surrounding text, to understand the image.
Describe the image the way you would to someone who cannot see it, in a short sentence, and include relevant context. For example, "Barista pouring latte art in a small cafe" is better than "coffee" or "IMG1234." Do not stuff keywords. Our guide to alt text best practices goes into more detail.
Use descriptive file names
Rename files before uploading. handmade-oak-dining-table.jpg tells search engines far more than DSC00192.jpg. Use lowercase and hyphens, as with URLs.
Compress and resize
Large images slow your pages, which hurts users and can hurt search performance. Resize to the displayed dimensions and compress without visible quality loss. See how to compress images.
Choose appropriate formats
Use JPEG for photos, PNG for graphics with transparency, SVG for logos and icons, and consider WebP or AVIF for smaller files. Provide fallbacks where needed.
Add context around the image
Place images near relevant text. Captions and nearby headings give extra signals about the subject and help readers too.
Use responsive images
Serve smaller versions to mobile devices with the srcset attribute, so phones do not download desktop-sized files. See responsive web design basics.
Lazy load below-the-fold images
Delay loading images that appear lower on the page, but do not lazy load your main top image, since that can slow the first impression. We explain this in lazy loading.
Include images in your sitemap if relevant
If images are important, such as for a photography business, make sure they are discoverable. See XML sitemaps.
Use original images when possible
Authentic photos of your products, team, and work are more useful and more distinctive than the same stock photos used everywhere.
Do not forget decorative images
Purely decorative images should have empty alt text so screen readers skip them.
The bottom line
Describe, name, compress, and place images thoughtfully. These small steps help accessibility, speed, and search visibility at the same time.