In the sitemap for the images, you should check the entries for "image:loc", that is, the image URL associated with an article, to see if it already exists for that article. For example, I use the JCE plugin "JCE MediaBox" for image (Slimbox) popups and if an image has such a value (as a href click event), the "image:loc" appears in duplicate for the corresponding article entry in the image sitemap.
I think that even if an image appears two or more times in an article, one entry for this image in the article sitemap entry is sufficient.
In the sitemap for the images, you should check the entries for "image:loc", that is, the image URL associated with an article, to see if it already exists for that article. For example, I use the JCE plugin "JCE MediaBox" for image (Slimbox) popups and if an image has such a value (as a href click event), the "image:loc" appears in duplicate for the corresponding article entry in the image sitemap. I think that even if an image appears two or more times in an article, one entry for this image in the article sitemap entry is sufficient.
https://extensions.schultschik.com/support-forum/schuweb-sitemap/132-sitemap-v5-1-0#523