Go to SEO, XML / HTML Sitemap.
Check Enable XML Image Sitemap and Save changes.
That’s it!
You can view your xml sitemaps by clicking on the button View your sitemap from XML sitemap page.
Or, by typing, https://example.com/sitemaps.xml/ in your browser.
Images included in XML Sitemap: standard images, image galleries, featured image, WooCommerce product images.