SVG Scaling

There is something odd going on with uploaded SVG scaling. In this thread:

TanneM273 uploaded an SVG file and the scale was ridiculously small.

When I uploaded a SVG file in response the SVG was small so I increased the scaling percentage (in the post) to 1000% to get it to a bigger size. The size did not increase linearly with the percentage entered. there seemed to be steps at which it jumped dramatically.

I’ve seen this before.

For some reason Discourse decided it should be 12x8 pixels.


I changed that to


and now you can see it.

I don’t know why discourse does that or how it comes up with pixel size for SVG, but when you post them you can see whatever numbers it chooses and add some zeros and/or multiply by something big.


Thanks, the physical size of the SVG is 12"x8" so Discourse might not recognize units in (some or all) SVG files.


I think I have successfully audited the entire site for this problem, using the database and filesystem access to look for instances. Except for one DM thread, I think that I have resolved all instances of this by editing posts.

I didn’t notice that the 8x11 pixel rendering was not a dust mote on my screen and previously just changed it to a download link. I fixed it now to have a reasonable size.

This one was so small that I think it didn’t render at all, because it was 2 x 3 pixels of mostly white.


Discourse has fixed this, and Maker Forums has been updated with the fix:

This does not retroactively change the resolution of previously-posted SVGs, but it should be fixed for all new uploads.

Thanks @Scorch for the insight into what the real problem was! I think it was key to the Discourse folks being able to find and fix this.