Bug #77190


ImageMainpulation for SVG only scales but does not crop

Added by Sebastian Müller almost 8 years ago. Updated 9 days ago.

Should have
Backend User Interface
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


If image is uploaded, ImageManipulation button is displayed for all types defined in $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'].

Text shown beside is:
Image manipulation is only available for supported types:

When manipulating SVG, svg just gets an width and height property and therefore is scaled down in FE. (Could also be archived by Appearance -> Media Adjustments -> width/height). * Calculate new dimensions for SVG image * No cropping, if cropped info present image is scaled down

Wouldn't it be better if button is not displayed for PDF, AI and SVG and text shown next to button does not list $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] as "Image manipulation supported types" but something only listing supported types?


pdf-in-textmedia.png (33.5 KB) pdf-in-textmedia.png Sebastian Müller, 2016-11-07 13:24
pdf-in-textmedia-page-module.png (29.4 KB) pdf-in-textmedia-page-module.png Sebastian Müller, 2016-11-07 13:24

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #93942: Remove Imagecropping at SVG Files?Resolved2021-04-19

Actions #1

Updated by Frans Saris almost 8 years ago

  • Status changed from New to Needs Feedback

For pdf and ai it partly makes sense to have the cropping as cropping works for these files (if I'm not mistaken) and when used with the image viewhelper there are converted to PNG/jpg.

Svg is a different story, as it is a vector based file we excluded this file type from the cropping to not loose the quality of the svg.

So IMO we should exclude svg for the cropping tool but not PDF and AI.

Actions #2

Updated by Alexander Opitz over 7 years ago

@Sebastian Kurfuerst: Can you say something to the answer from Frans?

Updated by Sebastian Müller over 7 years ago

I agree, for SVG icons there should be no cropping button.

PDF/AI: I just tested it with a fresh TYPO3 (7.6.12) with introduction package.

It is not working (tested with both, screenshots only from pdf):
  • I can not crop it when editing CE (pdf-in-textmedia.png)
  • in the page module it is displayed as GIF (pdf-in-textmedia-page-module.png)
  • in FE there is no media at all
Actions #4

Updated by Alexander Opitz over 7 years ago

  • Status changed from Needs Feedback to New
Actions #5

Updated by Benni Mack over 4 years ago

  • Status changed from New to Needs Feedback

Since TYPO3 v10 it is possible to actually define a "fileExtension" to allow cropping as well. This means - you cannot define in BE depending on the file extension what you could / should do. SVG icons can therefore be cropped or scaled the same way

Actions #6

Updated by Riccardo De Contardi almost 4 years ago has been merged if I am not wrong. Does it solve the issue?

Actions #7

Updated by Sebastian Müller almost 4 years ago

No, it does not solve the issue. Maybe it could, but if so it does not so by default.

I just set up a new TYPO3-v10 installation (, the mentioned commits already present),
uploaded an svg (e.g.,
created a new textmedia element and selected this svg.

Now I cropped the SVG,
but the crop-Preview displayed in the cropping popup and the cropping preview after the cropping popup is closed is not correct,
and after the record is saved, the backend crop-preview (not in the popup) does not show any cropping.
The output in frontend is not correct too (only scaled but not cropped).

I would expect that if I can upload an SVG and have the possibility to crop it (by default on an new installation) that the output would be correct.
If something has to be corfigured to make it work, may the possibility to crop SVGs should not be there by default?

Maybe I'm missing something?

Actions #8

Updated by Riccardo De Contardi over 3 years ago

  • Status changed from Needs Feedback to New
Actions #9

Updated by Benni Mack 9 months ago

  • Related to Bug #93942: Remove Imagecropping at SVG Files? added
Actions #10

Updated by Georg Ringer 9 days ago

  • Status changed from New to Resolved

with #93942 svgs can now natively cropped


Also available in: Atom PDF