I was looking for a good image sitemap generator for WordPress, but of course found nothing really good. So, I wrote my own ๐Ÿ™‚

2011-01-14 Update: XML Image Sitemap is now available from WordPress.org

I’m still fascinated by image search results, and hope this will help me rank for some keywords (or at least understand things better)


37 Comments » for Image Sitemap for WordPress
  1. Raj says:

    Thanks for this ๐Ÿ™‚

  2. Vicki says:

    Do you know of an image sitemap generator for standard websites? I’ve found one that will specifically create an image sitemap but it doesn’t pick up the title of the image, only the location and filename. It picks up the filename and puts that in the title place. Please let me know if you know of a generator. Thanks.

    • Eric Nagel says:

      Hi Vicki –

      That would be kind of difficult, as you wouldn’t know what page the image is on. However, I imagine you could write something that reads an “images” directory and then use the exif_read_data php function to read the comments. But, again, knowing what page that image is on is the hard part.

  3. Super cool stuff. I added the file to the FryingPanSports.com site. I couldn’t get the xml extension to work but submitted the php extension and Google didn’t have any issues with it.

    • Eric Nagel says:

      Yeah, I don’t think Google cares what the extension is. Now make sure you add titles to your images, so the “caption” is useful to the search engines (I see you’ve done this the past 2 posts)

  4. soup says:

    Hey man do you have an live example of how this should like like ?
    I tried this http://ericnagel.wpengine.com/sitemap-image.xml but do not think that it’s what i suppose to see right ?

    • Eric Nagel says:

      Hi,

      Yeah, that’s it. View Source, and you’ll see some formatting. I’m working on a WordPress Plugin that’ll do all of this automatically, but I’m having trouble submitting it to WordPress.org. I’ll get it up today, either here or on WordPress.org

  5. Walter says:

    It’s the only image sitemap plugin that works for me.
    However the URLs are not “pretty”… I’m getting the default, ugly, wordpress urls like this: http://www.domain.com/?p=253
    Do you know how to fix it?

  6. haris says:

    after i submit the image sitemap to google webmaster tool used this plugin, i lost my index in google image, Do you know how to fix it? please

    • Eric Nagel says:

      Start by using actual captions for your images. For example, you have:
      hayden-panettiere-wallpaper-hot

      Change the caption to:
      Hayden Panettiere Wallpaper – hot!

      As for why Google dropped you from the Image results, it could be many things. If you think the sitemap is at fault, remove it from your Webmaster tools account. But, I’ve successfully used this on numerous sites and have images listed in the image search results.

  7. Cor van Noorloos says:

    Hi Eric,

    It might be how it is suppose to work, but it seems when multiple posts are sharing the same image, only the first (date) post is listed as location

    • Cor van Noorloos says:

      Sorry, my mistake. It seems -looking at the media manager- this is simply how WordPress does things (:

      • Eric Nagel says:

        Yeah, an image will only be in the image sitemap once. You could always upload it twice, I suppose.

        • Cor van Noorloos says:

          Thanks Eric, for confirming this. This quick btw.! (:
          Thus far I’m completely liking your plugin.

          I’ve made one minor change though -not entirely sure if I can past code here.

          I’ve changed the post_title title to image:title instead of having both as image:caption.
          This way image:title shows if only the title has been submitted.

          Any chance including both in a perhaps future release?

          Meaning always showing the post title OR if different showing the image title (this is how the plugin currently works) AND if there showing the image caption.

          Sorry I can’t make myself not more clear. PHP doesn’t seems to be my native language (:

          • Eric Nagel says:

            I’ll review this – my latest post isn’t showing in the sitemap, so I wonder what’s stopping it.

            I struggled with showing the image caption, or title, or alt-text. Ideally, that’d be an option in the plugin, right?

            Version 2.0 ๐Ÿ™‚

  8. Cor van Noorloos says:

    Kind of forgot there’s also an alt-text (: But currently the post title, image title and image caption just seems to work just right.

  9. Fersy says:

    hi eric,

    i’am use your plugin but only one picture was displayed??
    any idea?

    http://www.spreephoto.de/sitemap-image.xml

    • Eric Nagel says:

      The plugin uses images that were uploaded as Media using WordPress (when you create a post or page, and you click on the “Upload/Insert” Image, and get the pop-up to “Add media files from your computer”).

      Your site looks great, but it looks like you’re using some sort of plugin to handle your gallery. I’m guessing they’re just not stored properly in the WordPress database.

      • Fersy says:

        hi eric,
        all my pictures using the wordpress media database..

        • Eric Nagel says:

          Unfortunately, without access to your database, I can’t debug much more. Try running the SQL command:

          SELECT * FROM wp_posts
          WHERE post_type = ‘attachment’
          AND post_mime_type like ‘image%’
          ORDER BY post_date desc

          and see what comes back. The results must not have a post_parent of 0.

          I’m esnagel on Skype, if you want further help.

  10. Fersy says:

    @eric

    the result:
    Zeige Datensรคtze 0 – 29 (1,235 insgesamt, die Abfrage dauerte 0.0034 sek.) [post_date: 2011-04-30 11:40:54 – 2011-04-29 21:46:45]

    1.235 pictures in database

  11. Cor van Noorloos says:

    Hi Eric,

    In a future version perhaps, would it be possible to change $post->guid to something different php-ish? Sorry, databases aren’t really my language.

    $post->guid seems to be more an ID than a permalink, which could cause some difficulties when changing from website URL.

  12. Bern says:

    Good stuff man!
    I’ll definitely give this a shot on a couple of my sites.
    Thanks!
    -J

  13. Just now downloaded the plugin. Seems to be good. Will post my opinion in some days.

  14. Levent says:

    Thank you for this plugin.I’m using this for 1 month and all my images indexed.Thanks

  15. Dennis says:

    Thank you very much for this Plugin! I was also looking for a XML Image Sitemap and didn’t found anything really good – so if you say that yours is better i count on you! ๐Ÿ˜‰

  16. Thanks – i used it for images

  17. fashionquest says:

    Awesome plugin, thank you!

  18. vinay says:

    Thanks,i was looking for this….. Awesome plugin

  19. Ashish Garg says:

    Hi Eric Nagel I make image sitemap for my site but
    this is showing 3 images on one link

    See the Result

    and say what i do for show only one image par post

    http://indianfunnypicture.com/sitemap-image.xml

    • Eric Nagel says:

      I’ll have to look at the code to see why you’re getting 3 images per post – it pulls from the WordPress Media library, but shouldn’t include an image more than once.

3 Pings/Trackbacks for "Image Sitemap for WordPress"
  1. […] been thinking something similar a few months ago, and made a wonderful little plug in called the XML Image Sitemap.  Itโ€™s available for download via your WordPress admin interface, and sets up in, well, […]

  2. […] an Image Sitemap (great example for WordPress blogs) and submit it to Google and elsewhere. To Improve Image Click Through Rate in Google This is a […]

Leave a Reply

Your email address will not be published. Required fields are marked *

*