I'm new to magento and learning hard thesedays. I have a task to display an image using raw controller but couldn't really find out how to do this. I have my image on etc/frontend/web/images as shown on the screenshot. [1]: https://i.sstatic.net/JMNmW.png
and my raw controller code is as below.
'''
class Raw extends Action { protected $raw;
public function __construct(
Context $context,
Raw $raw
){
$this->raw = $raw;
parent::__construct($context);
}
public function execute()
{
$result = $this->raw->create();
$result->render('<img src="../etc/frontend/web/images/Japan_bg.png"/>');
return $result;
}
}
'''
I know this code is really bad... I have found a way to print image URL but display... is there anyone who can help me out with this please?
Many thanks!!