• Resolved Martin von Berg

    (@martinvonberg)


    I’m using many images on my site. These are all added correctly to the Yoast sitemap.xml.
    Now, the first line of the post-sitemap is:
    <!– Alter HTML was skipped because the HTML is too big to process! (limit is set to 600000 bytes) –>
    although the XML is correctly generated.
    But this comment produces invalid XML.
    So, how to get rid of that comment?
    Thanks a lot in advance.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter Martin von Berg

    (@martinvonberg)

    Solved with this code in functions.php

    /* Limit the number of sitemap entries for Yoast SEO */
    function max_entries_per_sitemap() {
    return 20; // choose a reasonable number here
    }

    add_filter( ‘wpseo_sitemap_entries_per_page’, ‘max_entries_per_sitemap’ );`

Viewing 1 replies (of 1 total)
  • The topic ‘Sitemap too long with Images. XML invaild’ is closed to new replies.