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.
No.
— 🍌 John 🍌 (@JohnMu) September 6, 2020
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.
Sure. File size is independent of content type.
— 🍌 John 🍌 (@JohnMu) September 6, 2020
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:
I don't think it matters either way. We'll find 3 images, we'll crawl them, we'll move on. We don't recrawl images all the time (usually) so there wouldn't be a big effect on what needs to be recrawled regularly.
— 🍌 John 🍌 (@JohnMu) September 6, 2020