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

Ability to disable auto image discovery #24

Closed
gacek1123 opened this issue Mar 30, 2023 · 6 comments
Closed

Ability to disable auto image discovery #24

gacek1123 opened this issue Mar 30, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@gacek1123
Copy link

Clear and concise description of the problem

Google Search Console is reporting issues with the <image:image> tags in my sitemap. I don't really need them anyways, so I would like the ability to disable them.

Suggested solution

Add a new config option to allow users to disable this feature.

Alternative

No response

Additional context

No response

@gacek1123 gacek1123 added the enhancement New feature or request label Mar 30, 2023
@harlan-zw
Copy link
Collaborator

Hey @gacek1123, thanks for the issue.

I can add support to disable them, as a workaround you should be able to use the hooks.

Would you mind providing any more details on the GSC issue? If there is a problem that may affect other users there may be a bug fix needed as well

@anirudhmurali
Copy link

Same issue, any way to disable images in the sitemap? Search Console isn't validating this sitemap despite having a structured XML.

image

@gacek1123
Copy link
Author

@harlan-zw Google is showing 2 different errors:

  • first one saying that image has an invalid child tag url
  • second one saying that image doesn't have a required tag loc

So it seems that it's actually just a bug

@anirudhmurali
Copy link

Any fixes for this or tutorial to remove images with hooks? Unable to get the sitemap submitted.

@harlan-zw
Copy link
Collaborator

Thank you for clarifying and apologies for the delay.

I've pushed up a fix in 2.3.0 that should have images validate correctly.

If you'd still prefer to have the images disabled I've also added the option:

export default defineNuxtConfig({
  sitemap: {
    // avoids images being added to sitemap
    discoverImages: false
  }
})

Let me know if you have any feedback on it

@yeganathan18
Copy link

yeganathan18 commented Apr 2, 2023

Thanks @harlan-zw it works now 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants