What is replacement function for getting the skinurl in magento-2. In magento-1 we use $this->getSkinUrl() and {{skin url=''}} to get skin url.


1 Answer 1


in magento 1


Replace with in magento2


in magento 1

{{skin url=''}}

Replace with in magento2

{{view url=''}}


  • Does not explain how to fetch it from inside a template used by any block type
    – OZZIE
    Jul 26, 2016 at 13:06
  • @OZZIE every block file extends from Magento\Framework\View\Element\Template that extends with Magento\Framework\View\Element\AbstractBlock.php. you can on line 762 you can this method getViewFileUrl Jul 26, 2016 at 13:39

Your Answer

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

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