Add Images in Magento Theme template file
-
05-10-2020 - |
문제
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
해결책
$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
제휴하지 않습니다 magento.stackexchange