8

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

0

1 Answer 1

9
$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

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

Your Answer

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

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