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 个赞

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

1 个赞

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 个赞

能否在品牌部分提供两个 logo 选项?一个是用于常规图片的电子邮件 logo,另一个是支持 SVG 的网站 logo?我们目前正面临 logo 更换的难题——Chrome 对 PNG 图片的缩小处理效果很差。我尝试过的所有 CSS 建议均无效,而我们希望保留对高 DPI 屏幕的支持。

在标准 DPI 屏幕上,Chrome 中 logo 显示模糊:

我认为如今 SVG 已成为 logo 的公认标准。如果能在 Discourse 中尽可能支持 SVG,将非常理想。

当然,我们也欢迎任何其他解决方案的建议。

1 个赞

SVG 文件现在可用于网站标志,例如 Meta 上的标志就是 SVG 格式。还有一个独立的“摘要标志”设置,您可以上传不同文件格式的标志。

2 个赞

啊,真尴尬。看来是我的 SVG 出了问题。我试了另一个,它就能用了。谢谢你的帮助 :slight_smile:

2 个赞