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

Skin Images Location/Directory
 
aquiss
Member
 
Total Posts:  54
Joined:  2008-05-03
United Kingdom
 

I wonder if anyone can offer any input.

As part of our template design, I have added some custom images in the various template files, such as “1column.phtml” which are referenced in the normal html way within that file such as:

<img src="skin/frontend/default/default/images/footer_02.gif" width="165" height="39">
and also tried
<img src="images/footer_02.gif" width="165" height="39">

I have upload these images to “/skin/frontend/default/default/images/” which is the matching location on the server.

These files display fine within custom pages, such as the about us page, however as soon as you go into the catalog, they don’t display, and right clicking on images shows the path to the images is now different, which I presume is the rewrite rule kicking in.

What i would like to know is what is correct location to place custom images, and the exact img references I should be be using in files such as 1column.phtml and 3columns.phtml etc

Many thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

Because the base urls is defined in the admin/configuration, so in the phtml file you need to ‘getSkinUrl’

<img src="<?php echo $this->getSkinUrl('images/footer_02.gif')?>” />

 
Magento Community Magento Community
Magento Community
Magento Community
 
aquiss
Member
 
Total Posts:  54
Joined:  2008-05-03
United Kingdom
 

Thanks chinesedream, perfect smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top