Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Easy one - What’s correct path to images when writing HTML for CMS pages? 
 
mrgad
Member
 
Total Posts:  60
Joined:  2008-08-29
 

I’m writing CMS pages in HTML and have one very small problem.

Is it:

img src="{{unsecure_base_url}}skin/frontend/default/themename/images/filename.jpg"

That doesn’t seem to work, but I think I’m close.

Sorry this is such an easy one, but I’m stuck!

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
eCommercer
Jr. Member
 
Total Posts:  19
Joined:  2008-09-01
 

Okay… you are doing a few things incorrectly which would break the ability to change themes in the future automatically… this is the correct way to write HTML with images:

<img src="{{skin url='images/your_image_namejpg'}}" alt="" />

The image must be in the “images” folder of your theme. If you want you can add a sub-folder in your theme. For example, you can create a folder there called… my ui_images then the image html would be like this:

<img src="{{skin url=' ui_images/your_image_namejpg'}}" alt="" />
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top