I am working on a product import for MP, and will not import multiple identical images. If the import is run again, I want the images to be reused.
I will give the images the 'title' (or other tag) = 'SKU'.$suffix, where $suffix is '_0' for featured image, '_1' and '_2' for extra gallery images.
So, when the import run - I will check if the image already exists in media library, and import if not.
The test must check for images with the 'title' without knowing the post_id... anyone??