The same question was asked both on Twitter and on Reddit, asking do URLs in the image:loc tag also count towards the 50K XML sitemap limit? The answer is no, it does not count to the 50,000 URL limit in the XML Sitemap files.
In fact, John answered this was above but on Reddit, Gary Illyes from Google answered that one as “no, they don’t.”
Google’s XML sitemap documents say “all formats limit a single sitemap to 50MB (uncompressed) and 50,000 URLs.” So we know the image:loc does not count towards this but what about the 50MB file size? That it does seem to count towards.
But in general, images are not too frequently crawled and re-crawled by Google – we know that. But John explained this again and said this is a reason not to worry too much about them in this setting: