Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I want to access image from a Block in my custom module. This is my current code:
public function getCustomtxt()
<img src="<?php echo $this->getViewFileUrl('images/Phone.jpg');?>" />
Use below code to display image from image URL.
<img src="<?php echo $this->getViewFileUrl('images/footer-logo.png'); ?>" />
Change to below code
Use $this instead $block
<?php echo $this->getViewFileUrl('images/Phone.jpg');?>
Required, but never shown