SVG Logo Upload Support?

Hi, So upon running the wizard, instead of using a normal jpeg/png for the logo, I tried to upload an SVG file in place (for primary and compact logo versions) and it didn’t work. Is there anyway there could potentially be support for SVG Logos? It would work perfectly with all screen sizes (as it scales effortlessly) and is extremely compact (my JPEG takes 15kb while my SVG takes 1kb)

2 Likes

The problem is email. Email clients do not like svg.

1 Like

Ahh okay! That makes sense!

Also if it is a jpeg i suspect it should not be, otherwise it would not translate to SVG well. Have you tried png? Can you post it here?

Yeah, I just ended up realizing that using PNG with a transparent background is actually much more compressible than using JPEG with a white background…

the primary logo is the main annoyance since the added text doesn’t bode well for JPEG Compression, but oh well!

Convert to 8-bit PNG w/alpha (you don’t need more than 256 colors for this) then zopfli:

C:\Users\Jeff\Desktop>zopflipng Untitled.png Untitled.png
Optimizing Untitled.png
Filter strategy zero: 6459 bytes
Result is smaller
Input size: 10100 (9K)
Result size: 6459 (6K). Percentage of original: 63.950%

Gets it down to 6,459 bytes.

4 Likes

Could we possibly get two logo options in the branding section please? An email logo for conventional images, and SVG support for the on-site logo? I’m really struggling with a logo change we’re going through - Chrome does not downsize PNGs well at all. No CSS suggestions I’ve found work, and we want to retain high-DPI support.

Blurry logo on standard-DPI screens in Chrome:
active

I feel that SVG is pretty much an established standard for logos nowadays. It would be great to see SVG support brought to Discourse where possible.

Open to any other suggestions for solutions though?

1 Like

SVG files should be usable for site logos now, the logo here on Meta is an SVG for example. There’s a separate digest logo setting that you can upload a different filetype for.

2 Likes

Ah, how embarrassing. It seems to be a problem with my SVG. I tried another and it worked. Thank you for that :slight_smile:

2 Likes