Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sitemaps: Disable Image Sitemaps #7248

Open
seejacobscott opened this issue May 26, 2017 · 16 comments
Open

Sitemaps: Disable Image Sitemaps #7248

seejacobscott opened this issue May 26, 2017 · 16 comments
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Sitemaps Good For Community Hacktoberfest Support open source and earn a limited edition T-shirt! https://hacktoberfest.digitalocean.com/ [Pri] Normal [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Type] Good First Bug

Comments

@seejacobscott
Copy link

In the sitemaps module there's currently no way to disable any specific instances of the sitemaps, specifically the image sitemap.

Checking the developer options I'm seeing filters for excluding specific images but not a way to disable the full image sitemap.

requested in 3216712-t

Is there a way to turn off the image sitemaps entirely? We don't use
attachment pages in WP, and the sitemap is loaded with attachment pages,
since we have thousands of unattached photos. Obviously we don't want that
stuff indexed. I poked around the code, but couldn't figure out an easy way
to do that.

@seejacobscott seejacobscott added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Sitemaps labels May 26, 2017
@seejacobscott
Copy link
Author

Also requested in 636092-zen

@zinigor
Copy link
Member

zinigor commented Aug 15, 2017

Once we follow through with #7335 it should be easy enough to do. But for goodness sake please don't do anything before it's merged to avoid conflicts.

@jeherve
Copy link
Member

jeherve commented Nov 21, 2017

For now, one can use the following filter to disable image sitemaps:

add_filter( 'jetpack_sitemap_image_skip_post', '__return_true' );

@chaselivingston
Copy link
Contributor

Also requested in 932008-zen.

@cena
Copy link

cena commented Feb 6, 2018

Hi @zinigor ! Any word on whether this will be merged, since #7335 has been merged?

@jeherve jeherve added the Hacktoberfest Support open source and earn a limited edition T-shirt! https://hacktoberfest.digitalocean.com/ label Oct 1, 2018
@hakamairi
Copy link

I need this, any plan to support this?

@jeherve
Copy link
Member

jeherve commented Jan 18, 2019

@hakamairi That's not currently on our roadmap, but as you can see we've added the "Good For Community" label to this issue; if you were to contribute a patch for this feature, we'd be happy to review it and include it in Jetpack!

@1lucas
Copy link

1lucas commented Sep 14, 2019

add_filter( 'jetpack_sitemap_image_skip_post', '__return_true' );

where do i add the filter?

thx

@jeherve
Copy link
Member

jeherve commented Sep 15, 2019

@1lucas You can follow the instructions here to add custom code to your site:
https://jetpack.com/support/adding-code-snippets/

@rams85
Copy link

rams85 commented Sep 19, 2019

add_filter( 'jetpack_sitemap_image_skip_post', '__return_true' );

You can add this in functions.php of the active theme

@drwpcom
Copy link

drwpcom commented Dec 5, 2019

Another request to disable image sitemaps in 17122534-hc
Provided the filter and user added it using Code Snippets plugin but we're still seeing image links in the image xml sitemap.

Update: The code snippets seems to be working now.

@matticbot matticbot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Dec 5, 2019
@rachelwinspear
Copy link

Requested here: 15687925-hc
Took a while for the code snippet to take effect, but it now works.

@hubertnguyen
Copy link

Also supporting having a checkbox for disabling this. We have ~140,000 images and the sitemap has caused Google Bot to crawl all the (default) attachement pages that we don't actually use. It drained resources and went on undetected for a while.

@jartes
Copy link

jartes commented May 29, 2021

Requested here as well: 29339388-hc

@milosz
Copy link

milosz commented Aug 7, 2021

This is still a case.

@bobmatyas
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Sitemaps Good For Community Hacktoberfest Support open source and earn a limited edition T-shirt! https://hacktoberfest.digitalocean.com/ [Pri] Normal [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Type] Good First Bug
Projects
None yet
Development

No branches or pull requests