10

i tried to insert image with two different ways like through CMS pages in that select page and in content use below code:

<p><img src="{{skin url='images/media/404_callout1.jpg'}}" alt="" /></p>

and another way is by click on the "insert image" button.

Is there any other way for for insert image in CMS page?

Raptor
2174 silver badges15 bronze badges
asked Jun 24, 2013 at 6:49

3 Answers 3

10

Using the "Insert Image" button will add the images which are relative to the media wysiwyg directory

img src="{{media url="wysiwyg/filename.jpg"}}" alt="" />

You could also have images stored as the content of a static block and then call them into the cms page contact using either using

{{block type="cms/block" block_id="staticblock_identifier"}}

Or use the widget interface and select Widget Type "CMS Static Block" which will add blocks by id like

{{widget type="cms/widget_block" template="cms/widget/static_block/default.phtml" block_id="10"}}

If you'd like the image to appear just above or below the main content look at adding it through layout XML and adding a static block either for that page using the CMS page design tab or for every CMS page using the "cms_page" layout handle.

If your image is stored as a static block and you'd like it before the main content add the following XML to your page or cms handle.

<reference name="content">
 <block type="cms/block" before="-">
 <action method="setBlockId"><block_id>staticblock_identifier</block_id></action>
 </block> 
</reference>

If you'd like the block to come after the content enter

after="-"
answered Jun 24, 2013 at 7:26
1

go to magento admin panel, and go -> cms/pages/home page and select -> content ->in editor select insert/edit image and select browse icon click the create folder link and create the folder and choose the folder name as 777 then you upload your images in to the 777 folder and click on that image and then use the images in home page

answered May 21, 2014 at 5:14
0

you can also use this code if you are loading your cms from a phtml file:-

<img src="<?php echo $this->getSkinUrl('images/imagename.jpg') ?>" />

The image should be uploaded in the images folder at location skin/frontend/package_name/theme_name/

answered Mar 11, 2015 at 10:32

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.