*/ class Mage_Adminhtml_Model_System_Config_Backend_Image extends Mage_Adminhtml_Model_System_Config_Backend_File { /** * Getter for allowed extensions of uploaded files * * @return array */ protected function _getAllowedExtensions() { return array('jpg', 'jpeg', 'gif', 'png'); } /** * Overwritten parent method for adding validators * * @param Mage_Core_Model_File_Uploader $uploader */ protected function addValidators(Mage_Core_Model_File_Uploader $uploader) { parent::addValidators($uploader); $validator = new Mage_Core_Model_File_Validator_Image(); $validator->setAllowedImageTypes($this->_getAllowedExtensions()); $uploader->addValidateCallback(Mage_Core_Model_File_Validator_Image::NAME, $validator, 'validate'); } }