Is adding a new image class necessary for svg?

AI-generated summary

In a UX discussion titled ‘Is adding a new image class necessary for svg?’, Muiran initially asked whether an additional img class was needed to use SVGs and where to find instructions. jomaxro clarified that SVG uploads are disabled by default for posts but can be enabled via the authorized extensions site setting in the admin panel. After attempting to upload an SVG, Muiran encountered an error: ‘Sorry, but we couldn’t determine the size of the image.’ codinghorror asked zogstrip to check for regressions — which tophee explained as functionality that previously worked but may have broken due to code changes. zogstrip confirmed SVGs work and requested Muiran to share their problematic file. Muiran later resolved the issue by specifying pixel dimensions during export, acknowledging the problem was on their end. zogstrip confirmed that explicit height and width are required for SVGs to be processed correctly. The discussion concluded with Muiran thanking the team for their help.

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?

1 Like

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.

2 Likes

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

1 Like

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?

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

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

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.

2 Likes

Ok, that makes sense. Thank you much :thumbsup:

This is a SVG. Works just fine.

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

1 Like

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.

3 Likes

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