My extension comes with an icon, where can I place it in my module and how can I load it in the modules template?
Template:
<img src="/media/icons/new-badge.svg" class="new-icon" alt="NEW">
You can put icon/images at:
app/code/VENDOR/MODULE/view/frontend/web/images
to access those image in template, You can use:
<img src="<?php echo $this->getViewFileUrl('VENDOR_MODULE::images/icon.png'); ?>">
Hope above will help!
app/code/VENDOR/MODULE/view/frontend/web/images
<img src="<?php echo $this->getViewFileUrl('VENDOR_MODULE::images/icon.png'); ?>">