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
2 Answers
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
-
If your output shows /pub/ means you didn't setup the correct folder for the magento installation (which should be /pub). Oct 25, 2018 at 0:39
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.