# SVG Upload not working

**URL:** https://meta.discourse.org/t/svg-upload-not-working/45304
**Category:** Bug
**Created:** [June 6, 2016, 6:32am UTC](https://meta.discourse.org/t/svg-upload-not-working/45304 "2016-06-06T06:32:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mindworker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mindworker/32/115434_2.png) [@mindworker](https://meta.discourse.org/u/mindworker)
#### Post date: [June 6, 2016, 6:32am UTC](https://meta.discourse.org/t/svg-upload-not-working/45304/1 "2016-06-06T06:32:50Z")

</div>

I was informed by one of my colleagues that svg upload doesn’t work. However, linking to an external svg file works. I tested it on my production system after upgrading to the latest version as well as here.

I found a bugreport dated 1 1/2 years ago, pretty much the same except the error message is different now.

Steps to reproduce:

- Make sure SVG is an allowed file extension
- (download some SVG like this one: [http://upload.wikimedia.org/wikipedia/commons/b/b0/NewTux.svg](http://upload.wikimedia.org/wikipedia/commons/b/b0/NewTux.svg))
- Try to upload the SVG from your local computer

Error message:

> Sorry, but we couldn’t determine the size of the image. Maybe your image is corrupted?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [June 6, 2016, 2:58pm UTC](https://meta.discourse.org/t/svg-upload-not-working/45304/2 "2016-06-06T14:58:46Z")

</div>

The library we use to determine the size of an image didn’t support svg file with a doctype. It does now 😉

[https://github.com/discourse/fastimage/commit/48b0f5304c030fd0a33976f4428a8fb89ee09377](https://github.com/discourse/fastimage/commit/48b0f5304c030fd0a33976f4428a8fb89ee09377)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 6, 2016, 8:51pm UTC](https://meta.discourse.org/t/svg-upload-not-working/45304/3 "2016-06-06T20:51:52Z")

</div>


