As far as i understand the icons are now limited to three different sizes (small, default, large).
We used to have custom sized images for our content elements in nearly all our Typo3 instances. A tiny screenshot of a specialized content element make its function and appearance much more clear than an abstract icon, especially if you have plenty of content elements.
A possible solution would be implementing a hook to render a custom icon if an optional configuration exists and proceed with the the Icon API if not. Maybe someting like this:
if (isset($wInfo['iconProvider']) && !empty($wInfo['iconProvider'])) {
$params = array('wInfo' => $wInfo);
$icon = GeneralUtility::callUserFunction($wInfo['iconProvider'], $params, $this);
}
if (empty($icon)) {
$icon = $this->moduleTemplate->getIconFactory()->getIcon($wInfo['iconIdentifier'])->render();
}
or
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['NewContentElementController']['IconProviders'])) {
$params = array('wInfo' => $wInfo);
foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['NewContentElementController']['IconProviders'] as $funcRef) {
$icon = GeneralUtility::callUserFunction($funcRef, $params, $this);
if (!empty(icon)) break;
}
}
if (empty($icon)) {
$icon = $this->moduleTemplate->getIconFactory()->getIcon($wInfo['iconIdentifier'])->render();
}
This way a custom class could scan for a specific prefix or identifier to meet special demands.
Implementing an own IconFactory would be a hard task as this would also need an own Icon class that accepts other dimensions as the three default ones (Exception in setSize()).
And i can not foresee which impacts this appoach will have.
Another (ugly) approach would be xclassing the NewContentElementController class in our Typo3s what i really would like to avoid.