Sitemap not indexing all images

Ticket Description: I have about 5000 images on my site but the sitemap is not including all of them. I was using Yoast at the first place but all image XML URL were generating 404 errors. Then I switched to SmartCrawl but the generated sitemaps aren’t including the images as well. I’ve tried running a crawl several times which didn’t help as well.