How to Optimize Images for SEO: Format, Size, and Alt Text
Images account for over half the total weight of most web pages. Unoptimized images are the single biggest reason websites fail Google's Core Web Vitals assessments, which directly impacts search rankings. Image SEO is not just about alt text. It starts with choosing the right format and file size.
This guide covers everything you need to know about optimizing images for search engines: the best formats, ideal file sizes, proper dimensions, alt text best practices, and how to convert images without compromising quality.
Step-by-Step Instructions
- Choose the right image format
Use WebP as your default web image format. Google recommends next-gen formats in its PageSpeed Insights tool, and WebP is the most widely supported option. Use JPG for photographs when WebP is not an option. Use PNG only when you need transparency. Avoid BMP, TIFF, and uncompressed formats entirely on the web.
- Compress images to target file sizes
Aim for these file size targets: under 100 KB for blog images, under 200 KB for hero images, under 50 KB for thumbnails and icons. Use a quality setting of 80-85% for JPG and WebP. At these settings, compression artifacts are imperceptible to viewers but file sizes are dramatically smaller than uncompressed originals.
- Size images to their display dimensions
Never upload a 4000-pixel-wide image when it displays at 800 pixels. Resize images to 2x their maximum display width to account for retina screens. For a content area that is 800 pixels wide, upload images at 1600 pixels wide. This eliminates the Properly size images warning in PageSpeed Insights.
- Write descriptive alt text
Every image needs an alt attribute that describes what the image shows. Good alt text is specific and concise: use 'Golden retriever playing fetch in a park' instead of 'dog' or 'image'. Include relevant keywords naturally but never stuff keywords. Alt text serves both accessibility and image search indexing.
- Use descriptive file names
Rename files before uploading. Use hyphens to separate words: 'golden-retriever-park.webp' is far better than 'IMG_4523.jpg' for search engines. Google uses file names as one signal when indexing images, so descriptive names give you a small but free SEO advantage.
- Convert and verify with imageconvert.co
Batch convert your images to WebP using imageconvert.co. Drag multiple files at once, set the quality slider to 80-85%, and download the optimized versions. After uploading to your site, run Google PageSpeed Insights to verify that no image-related warnings appear.
How Images Affect Core Web Vitals
Google's Core Web Vitals measure real user experience, and images directly impact two of the three metrics. Largest Contentful Paint (LCP) measures how quickly the largest visible element loads, and that element is usually an image. If your hero image is 2 MB, your LCP will suffer. Cumulative Layout Shift (CLS) is affected when images without explicit width and height attributes cause content to shift as they load.
Passing Core Web Vitals is a confirmed Google ranking factor. Fixing your image optimization is one of the highest-impact changes you can make for SEO.
WebP vs JPG for SEO
Google has recommended WebP in its developer documentation since 2020. WebP files are 25-35% smaller than JPG at equivalent visual quality. Smaller files mean faster page loads, better LCP scores, and improved crawl efficiency since Googlebot can fetch more pages within your crawl budget.
Every modern browser supports WebP. There is no practical reason to use JPG as your primary web image format in 2026 unless you are targeting extremely legacy systems.
Image Sitemaps and Structured Data
For maximum image search visibility, include your images in an XML sitemap. Google discovers images through regular page crawling, but an image sitemap ensures nothing is missed. If your images represent products, consider adding Product structured data with image properties. This can earn rich results in Google Shopping and image search.
Frequently Asked Questions
Does image format affect SEO rankings?
Yes, indirectly. Image format affects page speed, which is a confirmed ranking factor. Using next-gen formats like WebP improves Core Web Vitals scores, which directly impacts search rankings.
What is the ideal image file size for web?
For most web images, aim for under 100-200 KB. Blog post images should be under 100 KB, hero images under 200 KB, and thumbnails under 50 KB. Use WebP format and 80-85% quality to hit these targets.
Should I use lazy loading for SEO?
Use lazy loading for images below the fold, but never lazy-load the LCP image (usually the hero or first visible image). Lazy loading below-the-fold images improves initial page load speed. Most modern browsers support native lazy loading via the loading=lazy attribute.
How many images should a blog post have?
There is no fixed number. Use images where they add value to the content. One well-optimized relevant image is better than five stock photos. For SEO, ensure each image has descriptive alt text and is properly compressed.
Convert images to WebP for better SEO