in my case there is a picture inside my module and I want to get that image inside an HTML file (it's an html file for email header), but when I use Magento syntax it doesn't appear, I have got the page blank without the alt attribute displayed, that means it is there but the page still blank
I have tested with a simple link src="https://www.w3schools.com/html/pic_trulli.jpg" it works
but not with this :
src="<?php echo $this->getViewFileUrl('Vendorname_Core::images/pic.png'); ?>"
can anyone help me, please?
update:
my file inside app/design dir to override : vendor/magento/module-email/view/frontend/email/header.html:
<table class="wrapper" width="100%">
<tr>
<td class="wrapper-inner" align="center">
<table class="main" align="center">
<tr>
<td class="header">
<img src="<?php echo $this->getViewFileUrl('Mymodule_Email::images/logo.png'); ?>"
/>
</td>
</tr>
<tr>
<td class="main-content">
<!-- Begin Content -->
img
directory name if you have putted in sub dir.