Page MenuHomePhabricator

SVG attachments are not displayed
Open, LowestPublic

Description

Reported upstream: https://secure.phabricator.com/T6445

In T1005#17606 the 2 attached svg files are not (easily/at all?) accessible in my browser. The only way I can find to view those files, is to download them first.

(possibly related to https://secure.phabricator.com/T4412 ? I do understand that svg is more complicated than png/gif/jpg... :/ )

Event Timeline

Quiddity created this task.Oct 31 2014, 9:53 PM
Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity added a project: Phabricator.
Quiddity changed Security from none to None.
Quiddity added a subscriber: Quiddity.
Qgil updated the task description. (Show Details)Oct 31 2014, 11:04 PM
Qgil added a subscriber: Qgil.

<qgil> SVGs not rendering in Phabricator, this is a surprise. Is there a task already reported? https://secure.phabricator.com/M1410
<epriestley> qgil: add the applicable MIME types to files.image-mime-types
<epriestley> We can probably bring that upstream if you want to figure out what they are and confirm they work.

Qgil triaged this task as Medium priority.Oct 31 2014, 11:10 PM

Normal priority only because we have so much in our plate right now. I agree this is important.

If someone wants to investigate and try out a solution in phab-01...

Qgil added subscribers: Gilles, Tgr.Oct 31 2014, 11:24 PM

<epriestley> We also probably can't thumbnail them because GD doesn't support that.
<epriestley> I'm not sure how to thumbnail an SVG, there may be some easy approach.
<epriestley> Or some easy-but-inconvenient approach, like "use width/height on the same file".

I added image/svg to https://phab-01.wmflabs.org/config/group/files/ but SVGs are still not rendered.

How does MediaWiki render SVG + thumbnails? Being Phabricator and MediaWiki PHP, is there a possibility to share some code or method?

Qgil updated the task description. (Show Details)Oct 31 2014, 11:33 PM
Qgil moved this task from Backlog to Wikimedia requests on the Phabricator (Upstream) board.
Qgil added a comment.Oct 31 2014, 11:39 PM
In T1016#17699, @Qgil wrote:

... and removed just in case.

MediaWiki thumbnails SVGs using these external applications https://github.com/wikimedia/mediawiki/blob/master/includes/DefaultSettings.php#L934-L957. The default ImageMagick version seems to be what is used on the WMF production cluster today.

We also have a lot of code in UploadBase that scans svg content when it is submitted to exclude some of the nastier things that are possible to embed in an svg image.

Qgil added a comment.Nov 1 2014, 7:20 AM

Some progress at https://secure.phabricator.com/T6445

The upstream instance now renders full size SVGs in the files pages. Thumbnailing is still missing. Example: https://secure.phabricator.com/M1410

This means that we have saved some clicks to users but there is still some work to do. Not bad for a few hours in a Halloween's Friday night. :)

Thank you @bd808, I have posted your comments upstream.

Qgil lowered the priority of this task from Medium to Low.Nov 7 2014, 10:49 AM
Volker_E added subscribers: Nirzar, Volker_E.EditedMar 15 2016, 10:55 PM

@Qgil Same issue still around at file upload view pages on SVGs. See for example: https://phabricator.wikimedia.org/F3633565 cc: @Nirzar

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 15 2016, 10:55 PM
Aklapper lowered the priority of this task from Low to Lowest.Sep 23 2016, 4:38 PM
Aklapper moved this task from Backlog to Reported Upstream on the Upstream board.

Unlikely to happen in upstream.
See security concerns in https://secure.phabricator.com/T6445#157697

Restricted Application added a project: Design. · View Herald TranscriptNov 8 2018, 7:43 PM