6

I want to add image like footer.png in

app/design/frontend/vendorname/themename/Magento_Theme/templates/html/footer.phtml

Here I am adding image using

<img src='<?php echo $this->getViewFileUrl('Company_Module::images/image-icon.png'); ?>' alt="image-icon" width="30" height="25"

Image In Magento_Theme/web/images folder

7
$this->getViewFileUrl('Company_Module::images/image-icon.png');

Your image should put under web folder in your custom module: app/code/Company/Module/view/frontend/web/images/image-icon.png

  • @MoinMalek you're welcome! – Khoa TruongDinh Jan 18 '17 at 9:58
  • how can i get the image in the default.html file? – SUBBULAKSHMI G Sep 19 '18 at 7:07
  • @SUBBULAKSHMIG what do you mean? your question is not clear to me. – Khoa TruongDinh Sep 19 '18 at 7:30

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.