# Is adding a new image class necessary for svg?

**URL:** https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079
**Category:** UX
**Created:** [2017年六月25日 01:37 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079 "2017-06-25T01:37:42Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Muiran](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/muiran/32/73797_2.png) [@Muiran](https://meta.discourse.org/u/Muiran)
#### Post date: [2017年六月25日 01:37 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/1 "2017-06-25T01:37:42Z")

</div>

Icwant use SVG and was curious if an additional img class needed to be added and where are the man instruction for doing it, if it is?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [2017年六月25日 01:47 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/2 "2017-06-25T01:47:06Z")

</div>

By default svg uploads are not allowed for posts, they are allowed for themes (in the admin panel). You can easily change which file formats can be uploaded by adding the extenstion to the `authorized extensions` site setting.

---

<div class="post-metadata">

### Author: ![Muiran](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/muiran/32/73797_2.png) [@Muiran](https://meta.discourse.org/u/Muiran)
#### Post date: [2017年六月25日 01:48 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/3 "2017-06-25T01:48:39Z")

</div>

Thank you, that’s what I needed to know.

---

<div class="post-metadata">

### Author: ![Muiran](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/muiran/32/73797_2.png) [@Muiran](https://meta.discourse.org/u/Muiran)
#### Post date: [2017年六月25日 02:05 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/4 "2017-06-25T02:05:48Z")

</div>

When I attempt to upload an svg file I get this message  
`Sorry, but we couldn't determine the size of the image. Maybe your image is corrupted?`  
What am I doing wrong?

---

<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: [2017年六月25日 02:09 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/5 "2017-06-25T02:09:00Z")

</div>

@zogstrip can you confirm there are no regressions with SVG image uploads?

---

<div class="post-metadata">

### Author: ![Muiran](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/muiran/32/73797_2.png) [@Muiran](https://meta.discourse.org/u/Muiran)
#### Post date: [2017年六月25日 02:10 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/6 "2017-06-25T02:10:53Z")

</div>

I don’t know what that is, regressions I mean.

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [2017年六月25日 05:09 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/7 "2017-06-25T05:09:47Z")

</div>

It means that something that once worked no longer works because of changes in the code. For you, right now, it means: wait, we’re looking into it.

---

<div class="post-metadata">

### Author: ![Muiran](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/muiran/32/73797_2.png) [@Muiran](https://meta.discourse.org/u/Muiran)
#### Post date: [2017年六月25日 05:12 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/8 "2017-06-25T05:12:31Z")

</div>

Ok, that makes sense. Thank you much 👍

---

<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: [2017年六月26日 14:04 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/9 "2017-06-26T14:04:12Z")

</div>

This is a SVG. Works just fine.

 ![](https://global.discourse-cdn.com/meta/original/3X/9/4/946543097654967ab7d50d26f566d416bc11f9f4.svg)

@Muiran would you mind uploading your SVG file somewhere on the ☁ so that I can have a look at it?

---

<div class="post-metadata">

### Author: ![Muiran](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/muiran/32/73797_2.png) [@Muiran](https://meta.discourse.org/u/Muiran)
#### Post date: [2017年六月26日 21:10 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/10 "2017-06-26T21:10:30Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/9/1/917cf4e8a660ff2bd7c90733088a8450b9387419.svg)

---

<div class="post-metadata">

### Author: ![Muiran](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/muiran/32/73797_2.png) [@Muiran](https://meta.discourse.org/u/Muiran)
#### Post date: [2017年六月26日 21:13 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/11 "2017-06-26T21:13:53Z")

</div>

Ok, seems that I needed to specify pixels in dimensions when I exported the file. The problem was on my end, so thank you much for helping me figure this out. Sorry for the trouble.

---

<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: [2017年六月26日 22:02 UTC](https://meta.discourse.org/t/is-adding-a-new-image-class-necessary-for-svg/65079/12 "2017-06-26T22:02:05Z")

</div>

> [@Muiran](#):
>
> Ok, seems that I needed to specify pixels in dimensions when I exported the file.

Yeah, we require the height and width of the image, otherwise, there’s no way to know the size of the image 😉
