We recently upgraded to Magento 2. On our M1 install, we used a script which did direct database insertion for our product images. This had the effect of allowing us to use one image for many products. For example, a hat may have multiple sizes in the same color, but they can all share the same image. This made it very easy if we had to replace images, which was a simple file-level copy-and-replace script.
On upgrading to Magento 2, the script was rewritten to use Magento's internal functionality. However, now when importing images, each size gets its own copy, with a number appended to the end.
This means that now, we're using 4x or 5x more space for a given product, as well as adding the step of deleting all images (up to 6 per product) for all sizes of a given product, since we can't really use the replacement script. This could mean going in and having to edit 4 or 5 per product that we're updating. Needless to say, this is a less-than-ideal situation.
Is there any way to prevent Magento from appending that number? Preferably only when using the upload script?