Magento : Get Media Url

Following are different ways to get Media URL in Magento.

1) You can get the Base Media Url in Magento with the following syntax:

Syntax : Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);

2) You can get the Base Media Url in magento with the following syntax:

$mediaUrl = Mage::getBaseUrl(‘media’);

Leave a Reply