Image path -> app/design/frontend/Mycustom/Mytheme/web/image/one.png how to get image in PHTML (app/design/frontend/Mycustom/Mytheme/Magento_Search/templates/form.mini.phtml) file,

<?php  echo __('Search');?>

I need to show image instead of text Search, any help thanks.

1 Answer 1


You can call static images in phtml by:

<img src='<?php echo $this->getViewFileUrl('images/my-logo.png'); ?>' alt="Logo">

Img Path:


Ref: link

  • Can i get help magento.stackexchange.com/q/328464/57334 How to create custom space below menu bar and move minicart element into this space, any help thanks.
    – zus
    Dec 27, 2020 at 7:08
  • Sure, let me try....
    – Pawan
    Dec 27, 2020 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.