Inside a block class which is being used to render a button in the admin panel, how to get the URL of the static content folder? Specifically, URL of the folder with images?
For example, in
Company_Helloworld module an image for a custom button is located here:
I tried this:
$url = $this->getViewFileUrl('Company_Helloworld::images/icon.png');
But it tries to retrieve the image from the
while the image is not there, image is actually in the module's folder:
$url = $this->getViewFileUrl('images/icon.png');
But it also tries to retrieve the image from the
Magento/backend theme, this time without module context:
Is there any way to put the image in the module and not in the backend theme?