Created
August 6, 2015 05:57
-
-
Save srinathweb/b228dcf1321847f88381 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://frontlinedev.com/image-paths-a-magento-how-to/ | |
| Media Images from Template (phtml) Files | |
| Adding an image from the media folder: | |
| <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA). 'subfolder/image.png'; ?>" /> | |
| *note Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) returns a path of www.yourwebsite.com/media | |
| Another way to produce the same link is: | |
| <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK). 'media/subfolder/image.png'; ?>" /> | |
| *note Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) returns a path of www.yourwebsite.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment