Context: How is the «Role» list implemented in the «Image Detail» popup on the backend product view?
Details: How does \Magento\Catalog\Model\Product::getMediaAttributes() work?
\Magento\Catalog\Model\Product::getMediaAttributes()