Project

General

Profile

Actions

Feature #81396

closed

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

Added by Erik Sommer almost 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Start date:
2017-06-01
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
no-brainer
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #77349: Allow additional paths for extension iconsClosedBenni Mack2016-08-02

Actions
Actions

Also available in: Atom PDF