Adding an Image Upload Field to the Magento System.xml Configuration

[xml]


Allowed file types: jpeg, gif, png.
image
adminhtml/system_config_backend_image
theme
theme
1
1
1
1

[/xml]

The element represents the location where the image will be uploaded to. In the above example, the image will be saved to a sub-folder under the media folder. e.g. /media/theme/.

The element is used to rendering the tag.

To output the image from the above example, you could use the following code

[php]
echo Mage::getBaseUrl(‘media’) . Mage::getStoreConfig(‘system_config_name/group/logo’);
[/php]