0

I want to change favicon icon while access pdf/image file from media path.I actually i already tried to change from admin and also update icon in media and skin folder but favicon icon not changed in media files.Also tried to change in root directory.

Please help me to solve this.

2
  • 1
    Your favicon is must have the name "favicon.ico" and you must put the file in your current theme, EX.: skin/frontend/package/theme/favicon.ico
    – St3phan
    Commented Sep 29, 2017 at 19:57
  • But i want to access from media.I can't move it in skin folder. Commented Sep 30, 2017 at 14:15

2 Answers 2

3

To change the Favicon simply:

Frontend: go Admin > system > configuration > General > Design tab > HTML Head > Favicon then you upload your favicon with the allowed file types: ico, png, gif, jpg, etc...

Admin: skin/adminhtml/default/default/favicon.ico

NB: don't forget to clear your browser and Magento cache.

0

I know this answer is 5 years too late...

To update your favicon image you have two options:

  1. Place the desired ico image in your skin/frontend/<package>/<theme> directory (as suggested by St3phan above)
  2. Upload your ico image to the media/favicon directory and create a core_config_data row with a value pointing towards it.

You can look at app/code/core/Mage/Page/Block/Html/Head.php _getFaviconFile() to see how the favicon file is loaded. Also note that the Head block will check the media directory first and looks for the file specified in Mage::getStoreConfig('design/head/shortcut_icon') before it checks the skin directory. Also note that the skin directory version must be named favicon.ico.

While there is the System->Configuration->General->Design->HTML Head->Favicon Icon field you can supposedly use to update your favicon image, it does not work for ico files. This is due to the validation that is run during the save process in app/code/core/Mage/Core/Model/File/Validator/Image.php which calls imagecreatefromstring (see https://www.php.net/manual/en/function.imagecreatefromstring.php) which will always return false because it does not support ico files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.