Project

General

Profile

Actions

Bug #66445

closed

SVG image has zero value in width and height after uploading via filelist

Added by Thomas Löffler over 9 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
Start date:
2015-04-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint

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.

  1. If I set image_width to e.g. 200, there is no effect.
  2. 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">
    
  3. 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

logo-spooner-web.svg (7.21 KB) logo-spooner-web.svg Thomas Löffler, 2015-04-15 22:24
Actions #1

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

Actions #2

Updated by Frank Nägler over 9 years ago

  • Assignee set to Frank Nägler

on it

Actions #3

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.

Actions #4

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.

Actions #5

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.

Actions #6

Updated by Thomas Löffler over 9 years ago

Yes, but resizing isn't possible yet. :(

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

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

Actions #12

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

Actions #13

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

Actions #14

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

Actions #15

Updated by Frans Saris over 9 years ago

  • Target version set to 7.2 (Frontend)
  • Sprint Focus set to Stabilization Sprint
Actions #16

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

Actions #17

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

Actions #18

Updated by Frank Nägler over 9 years ago

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

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF