Image SEO Optimizing images for search engines

Whether you’re a blogger or you write articles for an online magazine or newspaper, chances are you’ll find yourself asking whether your article needs an image or not. The answer is always “Yes”. Images bring an article to life and can also contribute to your website’s SEO. This post explains how to fully optimize an image for SEO and provides some pointers on using images for the best user experience.

Always use images

Images, when used with care, will help readers better understand your article. The old saying “A picture is worth a thousand words” probably doesn’t apply to Google, but it’s certainly true when you need to spice up 1,000 dull words, illustrate what you mean in a chart or data flow diagram, or just make your social media posts more enticing.

It’s a simple recommendation: you should add images to every article you write online to make them more appealing.

Finding the right image

Image SEO: This image isn't saying 'welcome to our company', it's saying 'welcome to a company'.It’s always better to use original images – those you have taken yourself – than stock photos. Your team page needs pictures of your actual team, not this dude on the right or one of his stock photo friends. Off topic: never mind that dude needs a haircut.

Your article needs an image relevant to its subject. If you’re choosing a random photo just to get a green bullet in our SEO plugin’s content analysis, then you’re doing it wrong. The image should reflect the topic of the post or have illustrative purposes within the article of course.

Master the basics of SEO with our Basic SEO training

  • Spice up your rankings with quick wins
  • Make sure you’re getting the basics right
  • Covers all important aspects of SEO
  • On-demand SEO training by Yoast
More info

There is a simple image SEO reason for this: an image with related text ranks better for the keyword it is optimized for. There’s more about image SEO later.


If you don’t have any images of your own that you can use, there are other ways to find unique images and still avoid stock photos. is a nice image source for instance, as explained in this article: How to Use Creative Commons Images from Flickr. I also like the images provided by sites like (formerly known as Check here for more image resources. Steer clear of the obvious stock photos, picking the ones that look (ok, just a bit) more genuine. But whatever you use, It seems like images with people in them always look like stock photos, unless you took them yourself. In the end, that’s always the best idea.

Obvious alternatives for photos could be illustrations, which is what we use, or graphs. An honorable mention should go to animated GIFs, as these seem to be getting more and more popular these days.

Image SEO: Animated GIFs are popular these days

But even though animated GIFs are popular, don’t go overboard. It’ll make your post harder to read, as the movement of the image distracts your readers’ attention. Like, for example, in the post where I found the image above.

Preparing images for use in your article

Once you have found the right image – whether an illustration, chart or photo – the next step is to optimize it for use on your website. There are a number of things you need to think about:

Choose the right file name

Image SEO starts with the file name. You want Google to know what the image is about without even looking at it, so use your keyword in the image file name. It’s simple: if your image is a sunrise in Paris over Notre Dame Cathedral, the file name shouldn’t be DSC4536.jpg, but notre-dame-paris-sunrise.jpg. The main keyword would be Notre Dame, as that is the main subject of the photo, which is why it’s at the beginning of the file name.

Scale for image SEO

Loading times are important for UX and SEO. The faster the site, the easier it is to visit and index a page. Images can have a big impact on loading times, especially when you upload a huge image then display it really small – for example a 2500×1500 pixels image displayed at 250×150 pixels size – as the entire image still has to be loaded. So resize the image to how you want it displayed. WordPress helps by automatically providing the image in multiple sizes after upload. Unfortunately, that doesn’t mean the file size is optimized as well, that’s just the image display size.

Use responsive images

This one is essential for SEO as well, and if you’re using WordPress it’s done for you since it was added by default from version 4.4. Images should have the srcset attribute, which makes it possible to serve a different image per screen width – especially useful for mobile devices.

Reduce file size

The next step in image SEO should be to make sure that scaled image is compressed so it is served in the smallest file size possible.

Of course, you could just export the image and experiment with quality percentages, but I prefer to use 100% quality images, especially given the popularity of retina and similar screens.

Image SEO: Optimize image file size using JPEGMini

Optimize image file size using JPEGMini

You can still reduce the file size of these images by removing the EXIF data, for example. We recommend using tools like ImageOptim or websites like JPEGMiniPunyPNG or

When you’ve optimized your images, test them with tools like YSlow.

Adding the image to your article

Now your image is ready to use, don’t just throw it into your article anywhere. As mentioned earlier, adding it close to related textual content helps a lot. It makes sure the text is as relevant to the image as the image is to the text.


Find out everything about SEO now!

  • From keyword research to technical SEO
  • New courses will be added automatically & free of charge
  • Earn 9 official Yoast certificates
  • Save 60% by bundling all courses!
More info
The image caption is the text that accompanies the image on the page – if you look at the images in this article, it’s the text in the gray box below each one. Why are captions important for image SEO? Because people use them when scanning an article. People tend to scan headings, images and captions as they scan a web page. Back in 1997, Nielsen wrote: “Elements that enhance scanning include headings, large type, bold text, highlighted text, bulleted lists, graphics, captions, topic sentences, and tables of contents.” In 2012, KissMetrics went even further, stating that “Captions under images are read on average 300% more than the body copy itself, so not using them, or not using them correctly, means missing out on an opportunity to engage a huge number of potential readers.”

Do you need to add captions to every image? No, because sometimes images serve other purposes. Decide whether you want to use yours for SEO as well or not. Bearing in mind the need to avoid over-optimization, I’d say you should only add captions where it would make sense to the visitor for one to be there. Think about the visitor first, and don’t add a caption just for image SEO.

Alt text and title text

The alt text (or alt tag) is added to an image so there will be descriptive text in place if the image can’t be displayed to the visitor for any reason. I can’t put it any better than Wikipedia: “In situations where the image is not available to the reader, perhaps because they have turned off images in their web browser or are using a screen reader due to a visual impairment, the alternative text ensures that no information or functionality is lost.” Be sure to add alt text to every image you use, and make sure the alt text includes the SEO keyword for that page (if appropriate) and relates to and/or describes the image.

When hovering over an image, IE shows the alt text as a ‘tooltip’. Chrome shows the title text as was intended. Title text for images is similar and a lot of people who use titles simply copy the alt text, but more and more people leave them out altogether. What is it for? “The title attribute can be very useful, but it is not a safe way of providing crucial information. Instead, it offers a good way to provide non-essential information, for example, the mood of the image, or what it means in context.” – in other words, it’s ‘nice to have’ information, but isn’t taken into account for image SEO.

Read more: Read more about alt tag and title tag optimization »

OpenGraph and Twitter Cards

Earlier on, I mentioned using images for social sharing. If you add the following image tag to the <head> section in your page HTML like this:

<meta property="og:image" content="" />

That will make sure the image is included in your share on Facebook (and OpenGraph is also used for Pinterest, for instance).


Our Yoast SEO plugin has a Social section where you can set and even – in the Premium version – preview your Facebook post. Make sure you use a high-quality image, like the original image you used in the post, as the social platforms use higher quality/larger images more often than not. If you have set this up correctly, and it doesn’t work, try to flush Facebook’s cache in the URL Debugger.

Twitter Cards do the same for Twitter and are also generated by our plugin.


This is one of my pet peeves: Images should never break the left reading line. I’m sure there are studies backing this up, but for me it’s personal. I just really don’t like it when text starts to the right of an image, only to jump to the left the next image down:

Maintain the left reading line; don't align images to the left

Maintain the left reading line; don’t align images to the left

If you use an image at the same width as your text column, that’s fine and it will even help emphasize the image more.

I’ll be honest: this has absolutely nothing to do with image SEO, but I saw the chance to express my opinion and used it! I think it’s bad for user experience. So, just to please me: don’t do this. Thanks, I appreciate it.

XML image sitemaps

If you are a web developer, you might wonder about XML image sitemaps. I’d prefer to describe this as images in XML sitemaps. Google is pretty clear about this:

To give Google information about images on your site, you’ll need to add image-specific tags to a sitemap. You can use a separate sitemap to list images, or you can add image information to an existing sitemap. Use the method that works for you!

Every now and then, people ask us about XML image sitemaps. We don’t generate these in our plugin, but follow Google’s advice and include them in the page or post sitemaps. Just scroll down in our post sitemap and you’ll see we have added images to all our latest posts (there is a column just for that). Adding images to your XML sitemaps helps Google index your images, so be sure to do so for better image SEO.

Image SEO: summary

Image SEO is the sum of a number of elements. With Google getting better at recognizing elements in images every day, it makes sense to make sure the image and all its elements contribute to a good user experience as well as SEO. It would be foolish to try to kid Google.

Keep these things in mind when adding an image to an article:

  • Use a relevant image that matches your text
  • Pick a good file name for your image
  • Make sure image dimensions match the image size as displayed
  • Use srcset if possible
  • Reduce file size for faster loading
  • Add a caption, if appropriate, for easier scanning of the page
  • Use image alt text. Title text is optional
  • Add OpenGraph and Twitter Card tags for the image
  • Don’t break the left reading line with an image – align images right or center
  • Use images in your XML sitemaps

Besides contributing to SEO and user experience, images can also play an important role in conversion!

Keep reading: Visually direct and captivate your visitors »

Category: Content SEO

Michiel is one of the partners at Yoast and our COO. He's happily married to Esther and proud father of his two daughters Puck and Linde. He was one of the first bloggers in the Netherlands and co-founded one of the first Dutch blogs about web design and blogging. At Yoast, he works as a senior SEO consultant for both customers and colleagues. And obviously is a daily, heavy user of all of our plugins! Read more about Michiel and find all of his posts »

43 Responses to Image SEO: Optimizing images for search engines

  1. seo company
    seo company  • 1 year ago

    Very nice article, everything is well explained.

    Image optimization plays a vital role in On-page optimization of a webpage. Starting from image file name to alt text and scaling the image everything counts here.

    Thanks for this great article Michiel.

  2. Manoj
    Manoj  • 1 year ago

    Hi Michiel,

    Excellent tips. This detailed post is very helpful for us to optimize images in websites and blogs. Thank you.

    Meanwhile, do you have any suggestions regarding image type? JPEG or PNG, what type of file we should use?

    • Willemien Hallebeek
      Willemien Hallebeek  • 1 year ago

      Hi Manoj,
      Thanks! Regarding image type, it depends a bit on what’s most important to you. Google generally advises to use PNG if you want to preserve the most detail with the highest resolution. If your users have limited bandwidth though, JPEG would be preferable, as the file size is smaller.

  3. online project
    online project  • 1 year ago

    Great Article!
    I appreciate for sharing these valuable information

  4. Chris Jericho
    Chris Jericho  • 1 year ago

    Michiel,thank you for existing to help us with your optimization tips! Very good.

  5. Gary Braniff
    Gary Braniff  • 1 year ago

    Hi Michiel
    This was a very informative post and I enjoyed reading it.

    One thing I am struggling with is deciding how many images to insert per number of words. I have not found a whole lot on this.

    • Willemien Hallebeek
      Willemien Hallebeek  • 1 year ago

      Hi Gary, we actually don’t use a ratio for this. Our articles show at least one image, and if it makes sense we add other images in the text to illustrate what’s written, so the reader will understand a text better.

  6. Nathan K Smith
    Nathan K Smith  • 1 year ago

    I just submitted a trouble ticket in the yoast seo premium. For some reason according to my google console my images are not being indexed. Do I have the wrong setting on the Yoast plugin?

    • Ben Vaassen
      Ben Vaassen  • 1 year ago

      Our support team has answered your email, if you still have further questions, you can reply to them! :-)

  7. Richard
    Richard  • 1 year ago

    When naming images, does it matter if you capitalize words?

    • Willemien Hallebeek
      Willemien Hallebeek  • 1 year ago

      Hi Richard, I don’t think Google treats capitalized words any different. If you think capitalizing first letters of words will draw more attention you can use it. It really depends on your own taste and that of your users though. We usually avoid using too many capitals, especially all caps, because it might look like your screaming.

  8. Kent Svenstrup
    Kent Svenstrup  • 1 year ago

    Good read. I have been thinking about optimizing the images on my site for a while now, and this really motivated me to priotize that task

    • Michiel
      Michiel  • 1 year ago

      Thanks! And good luck :-)

  9. Pavitra
    Pavitra  • 1 year ago

    I recently started working on my car blog and some recommended me to learn SEO. While searching for image SEO, I found this website. As I coded the whole script manually, any plugin was not something I can use to get my work done. So learning it from basics was important. This was very informative post for me.

    I was using random names for images and image size was the second issue I had. I hope to get more informative content to improve my blog’s visibility.


  10. Singh
    Singh  • 1 year ago

    Excellent tutorial, I am using the image seo plugin for my site that is doing its work like a charm and when you check the source of a wordpress post using that plugin you can check that proper image titles are inserted automatically to the images in every post. Simply outstanding.

  11. samba siva
    samba siva  • 1 year ago


    I am very new to Seo. Just learning more about on page Seo. Sir, Even though, I optimize images in my blog, It loads very slowly. Could you please tell me, How to decrease my blog load time ?

    • Michiel
      Michiel  • 1 year ago

      Hi Samba, perhaps this article will help you out: It shows you some site speed checking tools, that could help you identify the problem with the loading time of your blog. Those tools will also tell you how to solve possible issues.

  12. J. Husin
    J. Husin  • 1 year ago

    Now I know! Thank you for this very informative post. Now back to work on editing the pics on my website.

  13. akshay
    akshay  • 1 year ago

    I need to know about image optimization in details for my own blog images. Thanks to this awesome guidance which is helpful for me to follow up.
    Thank you

  14. Grosir jilbab murah
    Grosir jilbab murah  • 1 year ago

    Thank you for sharing this article. It is most helpful.
    I love using the Yoast SEO plugin

  15. Szörftábor
    Szörftábor  • 1 year ago

    I used in the image title and alt tags the same words and my image is in number 1 position…?

  16. Eduardo
    Eduardo  • 1 year ago

    Excelente!! enseñansa he aprendido mucho para aplicarlo a mi blog, saludos y bendiciones Michiel!!

  17. zee digitizing
    zee digitizing  • 1 year ago

    A comprehensive guide of image optimization for seo as well as visitors.

  18. Marcelle
    Marcelle  • 1 year ago

    Awesome information. I will stop being in such a rush with just placing images in and always getting to the seo of the image later. So guilty of that.

    • Michiel
      Michiel  • 1 year ago

      Hi Marcelle, I guess we all know that feeling… great idea. Good luck!

  19. Matteo Duò
    Matteo Duò  • 1 year ago

    Solid tips Michiel, you’ve got them all and, of course, great work!

    BTW, finding the right images to use takes a lot of time and the more we write, the more we need them, right? That’s why I put together a list featuring lots of resources where you can find photos and images for either personal or commercial use.

    Here’s the link to it:

    Hope someone finds it useful!

  20. Brad Marcus
    Brad Marcus  • 1 year ago

    Excellent article. I’ve been preaching this for years and the results are remarkable. One client saw their website traffic explode by 50% after optimizing image names and tags and their income went up by even more.

    • Michiel
      Michiel  • 1 year ago

      Hi Brad, awesome! Those are some nice results!

  21. John Johnson
    John Johnson  • 1 year ago

    Thank you for this article. It is most helpful. Would like some further info on images for ecommerce. For example I have one page with over 170 jpg images that are approx. 600×600 px. I use photoshop elements to work on my images. Obviously the load time exceeds 2 seconds. How do I deal with this i.e. set up multiple pages or what other suggestions would you have?

    • Michiel Heijmans

      have you tried lazy loading for these pages? That way images will only be loaded on scroll, so it just loads the images that are visible to a user.

  22. Gloria
    Gloria  • 1 year ago

    Lots of work since I am wedding photographer. Wish to add a tool that will automatically add all of this details for me

    I truly enjoy it the information.

  23. Daniel @ TME
    Daniel @ TME  • 1 year ago

    Sometimes it is important to go back to the basics and look at why we do certain things. I definitely don’t use captions enough, so will look at where I can start using them more in my content. 300% more engagement is nothing to your nose up at!

  24. Travis Neighbor Ward
    Travis Neighbor Ward  • 1 year ago

    Great article! I love using the Yoast SEO plugin. And I don’t hit publish until it gives me green lights. Thank you for a fantastic tool.

  25. Tabung pemadam api
    Tabung pemadam api  • 1 year ago

    hey Michiel’
    Creatively build me up

  26. Lrers
    Lrers  • 1 year ago

    Wow It is a fantastic idea to improve my images quality.

  27. Phoenix Pop Productions
    Phoenix Pop Productions  • 1 year ago

    Great article. Kraken is my preference for compression, although some detailed images are hard to get down in size. Speed is key, so what do you recommend for image file sizes; the max size for each image and all images as a whole on a web page?

    • Michiel Heijmans

      Depends on the purpose of your site and target audience as well. Here in the Netherlands, internet connections are really fast most of the time. I’m doing at least a 40Mbps download over 4G, WIFI, even at home, is up to 400/500Mbps up and down. So I really don’t care how large those images are :)

      On average, internet connections are a lot lower, of course. The main thing I can recommend without giving max sizes is that you put your best effort in this. If your website needs really sharp images for whatever reason, please serve these to your visitors. On for instance a real estate site, I want a good look at that image, and I am willing to wait another second. So again, it depends. Sorry I can’t give you any numbers here :(

  28. Matt LaClear
    Matt LaClear  • 1 year ago

    Hi, Michiel, I appreciate the effort you put into this post. I just skyped it to my graphics team to start implementing. Should we do our best to make the images appear original to Google? Or is that a waste of our time? Thanks!

    • Michiel Heijmans

      I’ say use an original image, don’t try to appear original.

      Don’t use the same (stock) photo for every website. Don’t use the photo everybody else is using. You’ll get lost in the similar section in Google Images.. Check this. Whoa. That’s 20M websites using an image that is or resembles that one image. Don’t be one of those 20 million :)

  29. Deepanker Verma
    Deepanker Verma  • 1 year ago

    I guess I follow most of these tips. I generally use Canva to create images for blog post and download images from Pixabay if needed any stock image to edit.
    Reducing file size is the important thing but I sometimes find it lazy to optimize images. But mostly I use ImageOptim.
    The only thing I have not yet done is the Image sitemap. I will do it today without wasting time. I can see traffic from Google images and I do not want to lose it.
    As always, a nice piece of article. :)

    • Michiel Heijmans

      Thanks, Deepanker.

    • Andrew Fletcher
      Andrew Fletcher  • 1 year ago

      very timely article, as I need to reduce the size of my site to speed load time and I think the number of large images is one issue…!

      • Michiel Heijmans

        No problem, Andrew!

Check out our must read articles about Content SEO

SEO copywriting: the ultimate guide

SEO copywriting is both a key element and a challenge in every SEO strategy. This guide covers all the phases of a good copywriting strategy.

Read article »

Keyword research for SEO: the ultimate guide

The first step in every content SEO strategy should be executing keyword research. In this ultimate guide, we'll teach you how to do that.

Read article »

Blogging: the ultimate guide

This ultimate guide covers all the important aspects of blogging. Find out how to set up a successful blog or how to make yours even better!

Read article »