MAGENTO2

How to Show category image in product page header in magento 2

if you have a custom them , then in that custom theme :

  1. make a folder Magento_Catalog in theme folder eg : app/design/frontend/Vendor/themename/Magento_Catalog
  2. In that folder make layout folder and in that create a file catalog_product_view.xml.
  3. Add the code in it ..

  <referenceContainer name=”page.main.title”>
    <block class=”Magento\Catalog\Block\Category\View” name=”abc” template=”Magento_Catalog::category/image.phtml”/>                    
    </referenceContainer>

Leave a Reply

Your email address will not be published. Required fields are marked *

two + seven =