0

I am trying to find where in the template files I can add microdata to my products gallery images, but struggling to find the template/file that actually outputs the HTML img tags.

I am actually adding this to all relevant elements of a product detail page (description, sku, price, etc, etc, etc), however the image was the first on my list to do, and already can't locate the file!!

Can someone help point me directly to the right place?

Magento 2.1.6 using Ultimo theme.

1
  • Enable front-end template path hints and then you can easily find out your file path
    – Ajithkumar
    Dec 12, 2018 at 17:44

1 Answer 1

0

If you are not able to find out your template path for your gallery module,you should enable template path hints in admin panel

---- Just for reference -----

Step 1 : Navigate Stores -> Configuration -> Advanced -> Developer -> Enabled Template Path Hints for Storefront -> Yes -> Save Config

enter image description here

Step 2 : Remove Cache

php bin/magento cache:clean

Step 3 : Refresh storefront you can find template path for your gallery module like below screenshot(i.e just for your referrence)

enter image description here

Notes : Enabled Template Path Hints for Storefront -> No -> Save Config and remove cache for disabling template path hints

1
  • Of course this is the very first thing I did, but the template that this points me to in my theme (product/view/gallery.phtml) and in the base theme does NOT include the HTML markup to insert an img tag into the page. Following the rabbit down that hole leads me to vendor/magento/module-catalog/Block/Product/View/Gallery.php which also does not create HTML tags. Where to go from there??
    – robgt
    Dec 13, 2018 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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