1

Any one have idea for how to call images in Static block not using editor like {{media url="wysiwyg/demo.jpg"}}?

Ashish Jagnani
6,3047 gold badges36 silver badges71 bronze badges
asked Sep 29, 2016 at 6:43
0

3 Answers 3

1

you can directly Upload image without using the media{}

http://screencast.com/t/VdPLZPrqS

Or

By Code in phtml file use below :

 <img src="<?php echo $block->getViewFileUrl('images/loader-1.gif'); ?>" alt="<?php echo __('Loading...') ?>">
answered Sep 29, 2016 at 6:54
1
  • i think its much faster to use directly upload . the image uploader at M2 is really slow for my opinion. Commented Sep 29, 2016 at 7:01
0

You can upload the image in skin/images folder and call that path in static block like :

<img src="{{skin url='images/your image name'}}" />
answered Sep 29, 2016 at 6:49
1
  • i only tag "magento 2" but i forgot to put it inside the title... thanks Commented Sep 29, 2016 at 6:59
0

The solution without using the feature of the wysiwyg to upload images

Its really good for mass upload images.

First step: Upload the image fie to http://ROOT/pub/media/wysiwyg/demo.jpg

Second step : Call it from the cms editor :

<img src="{{media url="wysiwyg/demo.jpg"}}" alt="your alt text here" />
answered Sep 29, 2016 at 6:48

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.