Sitemap not showing image files

#22238
  • Resolved Anonymous
    Rank Math free

    Hello,

    I’m using the avada theme with the buit in fusion builder. My site has been up for a while and we recently enabled RankMath. I’ve noticed that none of my images are showing in the sitemap.

    https://curioustenthire.co.uk/page-sitemap.xml

    Can you help please?

    Best wishes,

    Graeme

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    This might be as a result of a compatibility issue with how the Fusion Page builder adds images to your posts/pages. I can suggest that you get in touch with the developers so that they can help in integrating the following filter to add images to the sitemap:

    /**
     * Filter images to be included for the post in XML sitemap.
     *
     * @param array $images  Array of image items.
     * @param int   $post_id ID of the post.
     */
    add_filter( 'rank_math/sitemap/urlimages', function( $images, $post_id ){
    	return $images;
    }, 10, 2);

    Please take a look at the following article for more info on a similar fix for WPBakery:
    https://notasusual.co/rank-math-wpbakery-sitemap-fix/

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Anonymous
    Rank Math free

    Thanks for your quick response.

    If I’m using a child theme. Can I add this code to the functions.php to get the images to show?

    Hello,

    Thank you for contacting Rank Math today.

    Yes you can add this code to your child theme’s functions.php file but it will need a bit of customization to get the image values from the Fusion Builder.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Sitemap not showing image files’ is closed to new replies.