jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Sitemaps: Only include images attached to published and public pages

Open kraftbj opened this issue 8 years ago • 7 comments

When using the image sitemap, it currently includes all of the images in the media library. Since sometimes people upload images meant for future posts or are not meant for public consumption (though not locked down), we should investigate only including images that are attached to published and public pages.

Thoughts?

p7DVsv-3I9-p2 Related: #7333

kraftbj avatar Nov 09 '17 15:11 kraftbj

There's currently a way to do it using a filter. But I agree, we need to work on this.

zinigor avatar Jan 23 '18 20:01 zinigor

This issue has been marked as stale. This happened because:

  • It has been inactive in the past 6 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

stale[bot] avatar Jul 22 '18 20:07 stale[bot]

1427530-zen - Notified customer of pending patch in 10194 and general timeline if accepted.

kraftbj avatar Sep 21 '18 19:09 kraftbj

This can result in errors when the image sitemap is attempting to direct someone to a non-public page.

kraftbj avatar Sep 21 '18 19:09 kraftbj

Hi @kraftbj and @jeherve:

This problem came up for a WordPress.com user and an MGS search led me here. 8291431-zd-a8c (starting from 28 June 2024)

It's my understanding from this closed GH issue that Jetpack Sitemaps should no longer be showing images which are not actually part of a published post.

Their image sitemaps shows all images in their media library, as does the image sitemap on my test site.

Has this problem reappeared?

foleynotrose avatar Jul 01 '24 13:07 foleynotrose

Support References

This comment is automatically generated. Please do not edit it.

  • [ ] 1427530-zen
  • [ ] 8291431-zen

github-actions[bot] avatar Jul 01 '24 13:07 github-actions[bot]

Has this problem reappeared?

I don't believe so. The problem outlined here was a bit different: we wanted to ensure that if an image was part of a post that was not published yet, it would not be part of the sitemap.

We could, however, consider excluding images that are not attached to any post as well, images that were uploaded under Media > Library instead of through the post editor. I worry this may exclude too many images though, since there may be many unattached images that folks want to be public. Images uploaded via third-party services (like the mobile apps) can sometimes be unattached, for example.

jeherve avatar Jul 02 '24 16:07 jeherve

The problem outlined here was a bit different: we wanted to ensure that if an image was part of a post that was not published yet, it would not be part of the sitemap.

OK! That is not how I interpreted the outline of the problem by @kraftbj.

We could, however, consider excluding images that are not attached to any post as well, images that were uploaded under Media > Library instead of through the post editor.

So I guess this would be a feature request, and for now I can tell the user to use a filter?

Or that they need to delete any images from their Media Library that they don't want on their image sitemap? (I'm not sure if they're not technically savvy enough to enable a filter.

foleynotrose avatar Jul 03 '24 03:07 foleynotrose

I guess this would be a feature request, and for now I can tell the user to https://github.com/Automattic/jetpack/issues/7333#issuecomment-343550386?

Right, this may be the best approach for now.

jeherve avatar Jul 03 '24 07:07 jeherve

I have shared both options with the user. Closing this issue again.

ajaykj avatar Jul 03 '24 13:07 ajaykj