Title: Missing gallery images
Last modified: April 25, 2022

---

# Missing gallery images

 *  Resolved [goupilgraph](https://wordpress.org/support/users/goupilgraph/)
 * (@goupilgraph)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/missing-gallery-images-2/)
 * Hello,
 * By consulting the sitemap of my site I noticed that there was only one image 
   listed per product while there are 3 or 4.([https://moonlightcreations.fr/shop/paper-packs/knitted-digital-paper/](https://moonlightcreations.fr/shop/paper-packs/knitted-digital-paper/))
   
   The featured image is listed. The other images are in a gallery and I read that
   depending on the themes, Yoast couldn’t find those images. I am using Avada theme.
 * It is written to use the filter **wpseo_sitemap_urlimages**
 * I tried but nothing changes. I emptied my caches.
 * I am using this code in my functions.php file of my child theme. Is this correct?
 *     ```
       function filter_wpseo_sitemap_urlimages( $images, $post_id ) { 
         array_push($images, 'https://moonlightcreations.fr/wp-content/uploads/2021/05/school-digital-paper-chalky-printable-design-chalk-paper-scrapbooking-collection-chevron.jpg');
         return $images; 
       }; 
       add_filter( 'wpseo_sitemap_urlimages', 'filter_wpseo_sitemap_urlimages', 10, 2 );
       ```
   
 * Thank you for helping me.
    -  This topic was modified 4 years, 3 months ago by [goupilgraph](https://wordpress.org/support/users/goupilgraph/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmissing-gallery-images-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Maybellyne](https://wordpress.org/support/users/maybellyne/)
 * (@maybellyne)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/missing-gallery-images-2/#post-15591685)
 * Hello Goupilgraph,
 * Thanks for reaching out about your gallery images.
 * As you rightly mentioned, adding the filter `wpseo_sitemap_urlimages` to your
   functions.php file will register images from page builders to the sitemap. Kindly
   refer to [this](http://hookr.io/filters/wpseo_sitemap_urlimages/) to see how 
   to implement it as I am unable to review your code.
 * Thanks.
 *  Thread Starter [goupilgraph](https://wordpress.org/support/users/goupilgraph/)
 * (@goupilgraph)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/missing-gallery-images-2/#post-15606515)
 * Thanks for responding so quickly.
 * I’m not really familiar with PHP. Nobody here can validate me or correct me the
   code please?
 *  Plugin Support [Michael Tiña](https://wordpress.org/support/users/mikes41720/)
 * (@mikes41720)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/missing-gallery-images-2/#post-15607571)
 * Hi,
 * We aren’t able to validate or confirm if the usage of the `wpseo_sitemap_urlimages`
   filter is correct as it’s outside our scope of support. We also wouldn’t want
   to suggest incorrect code that might break your site. We recommend that you reach
   out to your web developer or programmer for further assistance on this – [https://yoast.com/help/images-in-the-xml-sitemap/](https://yoast.com/help/images-in-the-xml-sitemap/)
 * We’ll also be leaving this forum thread open for a few days just in case any 
   users want to help or provide further advice. Thanks for your understanding!
 *  [Jeroen Rotty](https://wordpress.org/support/users/jeroenrotty/)
 * (@jeroenrotty)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/missing-gallery-images-2/#post-15630886)
 * I marked this thread as resolved due to a lack of activity by the original poster.
   The original poster is always welcome to re-open this topic.
 * If you are not the original poster but have a similar issue, please read [this post](https://wordpress.org/support/topic/read-this-before-your-post/)
   before [opening a new request](https://wordpress.org/support/plugin/wordpress-seo#new-post).

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

The topic ‘Missing gallery images’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [image](https://wordpress.org/support/topic-tag/image/)
 * [sitemap](https://wordpress.org/support/topic-tag/sitemap/)

 * 4 replies
 * 4 participants
 * Last reply from: [Jeroen Rotty](https://wordpress.org/support/users/jeroenrotty/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/missing-gallery-images-2/#post-15630886)
 * Status: resolved