Issue Feature Closed

#81396Change preferred file format of ext_icon from .png to .svg

Erik Sommer 06/01/17, 10:50 updated 10/02/18, 10:59

Description

If you have an extension that is compatible with < 7.0 you are forced to use an png/gif icon for your extension although newer TYPO3 version also support svg images.

Older versions only support png/gif for icons so you have to provide one if it should be displayed in the extension manager. For > TYPO3 7.0 a svg version should be preferred. You could provide both in your extension but if a .png is found it will be preferred due to the implementation.

https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_7-0/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php#L1444

$iconFileTypesToCheckFor = array('png', 'svg', 'gif');
foreach ($iconFileTypesToCheckFor as $fileType) {
    if (file_exists($extensionPath . 'ext_icon.' . $fileType)) {
        $icon = 'ext_icon.' . $fileType;
        break;
    }
}

The order of preference for icon formats is therefore png > svg > gif. My issue is that the correct order should be svg > png > gif since a scalable vector icon is superior at this small scale. Changing the preferred order would allow to provide a svg for new TYPO3 versions and a png for legacy support.

Reviews 2