How to delete a product image if you got the message «The image cannot be removed as it has been assigned to the other image role»

image
product-image
backend-product-view

(Dmitry Fedyuk) #1

See the code:

As you can see, an image will not be deleted if Magento 2 considers that the image is used by another store.
So you should switch to the global scope before deleting the problem image:


The message «The image cannot be removed as it has been assigned to the other image role» is unclear because it does not say what exactly the administrator should to do to remove the problem image
(Dmitry Fedyuk) #2

See also: