4

I magento 1x i can put url of images like {{media }} or {{skin }}. I have take a look in frontend dev docs but not mention about this. Can anyone tell me how to put images url in cms page many thanks

1

2 Answers 2

21

Magento 2 has many directives such as:

View URL

<img src="{{view url=images/logo.svg}}" alt="" />`

Media URL

<img src="{{media url=test/logo.svg}}" alt="" />

Example output

<img alt="" src="http://mag2.com/pub/media/test/logo.svg"> 

More Info

For a complete course of directives click here

1
  • If your output shows /pub/ means you didn't setup the correct folder for the magento installation (which should be /pub). Commented Oct 25, 2018 at 0:39
2

It is the same deal.

<img src="{{media url=""}}" alt="" />

If you show/hide editor when editing the content of a cms page you can insert an image using the wysiwig.

2
  • How to use media folder in custom theme? If i want use images from app\design\frontend\VendorName\ThemeName\media
    – mrtuvn
    Commented Sep 8, 2015 at 7:20
  • M2 don't have skin. Does any ways to use getSkinUrl like M1x older ver
    – mrtuvn
    Commented Sep 10, 2015 at 1:57

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.