Bug #66445
closedSVG image has zero value in width and height after uploading via filelist
100%
Description
Hi,
I uploaded several SVG images and wanted to show them via the Images CE.
In the backend there is no preview and in the frontend, the image is not visible and there is no HTML output.
- If I set image_width to e.g. 200, there is no effect.
- If I set the field "Image Crop" to "200" (directly in the IRRE element), I get HTML output and the image is of big size:
<img width="0" height="0" alt="" src="/fileadmin/content/sponsoren/logo-spooner-web.svg">
- If I set the field "Image Crop" to "0,0,200" (directly in the IRRE element), it's the same effect as above.
I'm using the default settings for Graphics Magick (1.3.16).
SVG image is attached.
Files
Updated by Wouter Wolters over 9 years ago
- Status changed from New to Needs Feedback
which 7.x version are you using? SVG support is merged a few days ago in master
Updated by Frank Nägler over 9 years ago
if the file does not contain a XML prolog, the file is indexed with mime type text/plain, in this case the size could not be extracted.
Try to find a solution.
Updated by Thomas Löffler over 9 years ago
After prepending <?xml version="1.0" encoding="UTF-8"?>
to the SVG file, it's indexed as image/svg+xml.
But resizing isn't possible yet.
Updated by Frank Nägler over 9 years ago
FileInfo::getMimeType()
returns text/plain instead of image/svg+xml for svg files without XML-Prolog.
It looks like this is the problem. After adding the XML Prolog to the SVG file, it is indexed with correct mime type, the size is extracted and the rendering works.
Updated by Thomas Löffler over 9 years ago
Yes, but resizing isn't possible yet. :(
Updated by Gerrit Code Review over 9 years ago
- Status changed from Needs Feedback 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 http://review.typo3.org/38727
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38727
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38727
Updated by Gerrit Code Review over 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38727
Updated by Gerrit Code Review over 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38727
Updated by Gerrit Code Review over 9 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38727
Updated by Gerrit Code Review over 9 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38727
Updated by Gerrit Code Review over 9 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38727
Updated by Frans Saris over 9 years ago
- Target version set to 7.2 (Frontend)
- Sprint Focus set to Stabilization Sprint
Updated by Gerrit Code Review over 9 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38727
Updated by Gerrit Code Review over 9 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38727
Updated by Frank Nägler over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1c0420df596c9874acedbc4c0930f5c46182fde2.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed