SVG upload fails with an error message


(ljpp) #1
Sorry, but we couldn't determine the size of the image. Maybe your image is corrupted?

I found this bug report, which has been closed last summer. However I just reproduced the exact error message on 1.6.4 stable, when trying to upload an SVG image - our site logo, which currently serve from an external source.

Ubuntu file manager (Nautilus) has no issues reporting the image size 692x187.


(RĂ©gis Hanol) #2

Can you upload that image somewhere else and post a link here so that I can have a look?


(ljpp) #3

There ya go:

https://old.tappara.info/fileserver//tappara_co_vaaka_v2.svg


(RĂ©gis Hanol) #4

I used kraken.io to clean/optimize the SVG and it works fine now :wink:

FYI: it’s usually best to always clean & optimize SVGs (and other images) before using them on the web.


(Mittineague) #5

Is doing that what removed the hundredths pixels ?

width="691.65px" height="187.09px"

(RĂ©gis Hanol) #6

That and all the useless comments at the top of the file.


(Jeff Atwood) #7

Hmm the lightbox is not good though:


(RĂ©gis Hanol) #8

This is now fixed :panda_face:

We weren’t sending the content-type to S3 when storing optimized images. It was fine for images because browsers detect it from the extension (or the first few bytes) but for SVG, it was not properly interpreted by all the browsers).


(Jeff Atwood) #9