Project

General

Profile

Actions

Feature #78590

closed

Custom backend logo: width and size for svg files

Added by Josef Glatz over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend User Interface
Target version:
Start date:
2016-11-07
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

Problem/Description

getimagesize() tries to get width and height of an custom backend logo. But that's not possible on svg files as there is no height or width. A custom svg logo is actually rendered without height/width attributes.
I suggest to add support for width/height attributes via the filename. With that change, it's possible to add wide backend logos also with svg file formats.

ToDo(s)

  • Extend \TYPO3\CMS\Backend\Controller\BackendController::render() to check for pattern "w123h123" in the filename if the custom logo is svg.
    • Fallback to the default backend logo size of 22x22px if no dimensions are given for the custom svg icon.
  • Add Feature rst file

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #78600: Replace getimagesize() by \TYPO3\CMS\Core\Type\File\ImageInfo()ClosedMarkus Klein2016-11-07

Actions
Actions #1

Updated by Gerrit Code Review over 7 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50522

Actions #2

Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50522

Actions #3

Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50522

Actions #4

Updated by Frans Saris over 7 years ago

  • Status changed from Under Review to Needs Feedback

The core provides a class the get the image dimensions.

$imageInfo = GeneralUtility::makeInstance(FileType\ImageInfo::class, $fileNameAndPath);

Can this be a solution for getting the dimensions?

See https://github.com/TYPO3/TYPO3.CMS/blob/6c21ec7b58ca547eb1d908ee289dd1732313a90d/typo3/sysext/core/Classes/Resource/Index/MetaDataRepository.php#L69 for an example

Actions #5

Updated by Gerrit Code Review over 7 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50522

Actions #6

Updated by Gerrit Code Review over 7 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50522

Actions #7

Updated by Gerrit Code Review over 7 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50522

Actions #8

Updated by Gerrit Code Review over 7 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50522

Actions #9

Updated by Gerrit Code Review over 7 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50522

Actions #10

Updated by Gerrit Code Review over 7 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50522

Actions #11

Updated by Gerrit Code Review over 7 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50690

Actions #12

Updated by Anonymous over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Gerrit Code Review over 7 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50690

Actions #14

Updated by Gerrit Code Review over 7 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50864

Actions #15

Updated by Georg Ringer over 7 years ago

  • Status changed from Under Review to Resolved
Actions #16

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF