SVG Logo Upload Support?

AI-generated summary

SVG Logo Upload Support

The discussion revolves around adding support for SVG logos in Discourse. Blackglade initially tried to upload an SVG file but encountered issues. codinghorror explained that email clients do not support SVG, which is a limitation. However, awesomerobot later revealed that SVG files can be used for site logos, and a separate digest logo setting allows for different file types.

Amethi suggested having two logo options: one for email and another for the on-site logo, citing issues with Chrome downsizing PNGs. codinghorror provided an optimization technique for PNGs using zopfli.

Ultimately, Amethi discovered that the issue was with their specific SVG file, and another file worked successfully.

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 curtidas

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

1 curtida

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 curtidas

Seria possível obter duas opções de logotipo na seção de marca, por favor? Um logotipo por e-mail para imagens convencionais e suporte a SVG para o logotipo no site? Estou com muita dificuldade com uma mudança de logotipo que estamos fazendo — o Chrome não redimensiona bem arquivos PNG. Nenhuma sugestão de CSS que encontrei funciona, e queremos manter o suporte a alta resolução (high-DPI).

Logotipo borrado em telas de DPI padrão no Chrome:

Acredito que o SVG é praticamente um padrão estabelecido para logotipos hoje em dia. Seria ótimo ver o suporte a SVG implementado no Discourse, sempre que possível.

Estou aberto a outras sugestões de soluções, no entanto.

1 curtida

Os arquivos SVG agora podem ser usados como logotipos do site; o logotipo aqui no Meta, por exemplo, é um SVG. Há uma configuração separada chamada digest logo onde você pode fazer upload de um arquivo com outro formato.

2 curtidas

Ah, que vergonha. Parece ser um problema com meu SVG. Tentei outro e funcionou. Obrigado por isso :slight_smile:

2 curtidas