Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Holly Banning
Holly Banning
16,096 Points

My Sitemap isn't indexing images? is that normal?

Hello all,

I've looked for a segment in treehouse regarding sitemaps and have yet to find one (a segment on this would be nice though! :) I've done some reading on the subject and have just been left confused, so any answers would be appreciated!

I've recently created a simple gallery wordpress site, with image listing pages and a single viewing page for each image. Problem is that my sitemap is registering 0 images in the listing pages such as the home page (this is terrible for SEO I think?). Images are registering on the single pages. The sitemap won't index any images on pages where the images are dynamically generated either with a gallery or a wordpress loop. I'm really not sure if the sitemap is working as intended, and is not meant to list the images on listing pages or any page which doesn't have 'attached images', or if there's some terrible newbie flaw in my coding that has resulted in none of the images being indexed.

Not sure how to link the sitemap here, so will just copy paste an excerpt.

A listing page: http://localhost/***/gallery/gallery/ 20% 0 Weekly
http://localhost/***/gallery/home-display/ 20% 0 Weekly
http://localhost/***/gallery/illustration/ 20% 0 Weekly

A single page: http://localhost/***/art/*********/ 60% 1 Weekly

Any help would be appreciated! My friend is impatiently waiting for this site to be completed:)

Btw bonus points for anyone who can explain what an 'attached image' is and why an image that is in the markup of the listing pages doesn't count as an attached image.

2 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi Holly,

Images don't need to exist within the sitemap as the content on the page should be the relevant information for that link, for the sites I work on I always exclude media and attachments along with specific post types to keep everything clutter free.

Holly Banning
Holly Banning
16,096 Points

Oh so there's no issue with the sitemap? it's working correctly? That saved me an aneurysm or 2:D

Thanks!

Chris Shaw
Chris Shaw
26,676 Points

Indeed it is, as long as your post types make it in search engines such as Google and Bing will have no trouble indexing your content.