I have created a custom image attribute and I can get this to appear as a Role option.

The problem is roles can only be assigned to a single image and I need an attribute that I can assign to multiple images in order to place the images in certain positions on the front end.

Can this be achieved using image attributes or is there an alternative method for what I need to achieve?

Thanks in advance.


I ended up using the solution here: how to save image custom attribute in magento 2

(For anyone else who tries this - don't forget to add a vendorname/modulename/etc/adminhtml/events.xml otherwise the ProductSaveAfter Observer won't work, as this step wasn't mentioned).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.