Showing results for 
Search instead for 
Did you mean: 

Media image attribute in product listing

Media image attribute in product listing

Feature request from tzyganu, posted on GitHub Oct 14, 2014

Is there any reason why I cannot set a product attribute with type 'Media Image' to be used in product listing?
When I create an attribute from Stores->Attribute->Products and select the Catalog Input Type for Store Owner to be Media Image the Frontend Properties tab disappears completely.
If I create the attribute like that and then change the value for the field used_in_product_listing in the catalog_eav_attribute table for the attribute I just created to 1 it works just fine. I have my attribute loaded in the product listing page.
Sometimes I may need an additional image attribute in the product listing. I cannot do that from the UI and I see no reason for it. A real use case: I want to have a rollover image. When hovering the product image I want to see a different image (with the backside of my product for example).

This problem exists in Magento 1 also. I hope it will be tackled at least in M2.

And while on this...please change the label of the attribute type field. Catalog Input Type for Store Owner sounds scary. Attribute type sounds more friendly.

New Member
Status changed to: Investigating
New Member

Comment from verklov, posted on GitHub Nov 08, 2014

@tzyganu, thank you for reporting this to us! We will review this issue. At a brief glance looks like a bug. We will also consider your suggestion on renaming the field )

New Member

Comment from vpelipenko, posted on GitHub Jan 29, 2015

Internal ticket: MAGETWO-30483

Occasional Contributor

If someone needs this feature as I did then all you need to do is this:

Create and attribute in my case I called 'image_hover' the next part is the trick bit and you need to do for this work.

Upon selecting `Media Image` in 'Catalog Input Type for Store Owner' drop down the tab 'Storefront Properties' on the left in "ATTRIBUTE INFORMATION" will display none, inspect element  and remover the display none from 3 <li> item then selecct "Yes" in "Used in Product Listing" and "Yes" in "Visible on Catalog Pages on Storefront" and SAVE.


In you custom theme in "magento2rootfolder/app/design/frontend/{Company}/{Module}/Magento_Catalog/templates/product/list.phtml" you can read the image path value as simple as `


Good luck!