Sitemap not showing image files

#22238
Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael Davis
    Rank Math pro

    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.

    ​​​​​​​

    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?

    Michael Davis
    Rank Math pro

    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.