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개의 좋아요

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개의 좋아요

브랜딩 섹션에서 로고 옵션을 두 가지로 제공해 주실 수 있을까요? 일반 이미지용 이메일 로고와, 사이트 내 로고를 위한 SVG 지원이요. 현재 로고 변경 문제로 상당히 애를 먹고 있습니다. Chrome은 PNG 파일을 잘 축소하지 않기 때문이죠. 제가 찾은 CSS 제안들은 효과가 없었고, 고해상도(DPI) 지원을 유지하고 싶습니다.

Chrome에서 표준 DPI 화면에서 보이는 흐릿한 로고:

요즘 로고에는 SVG가 사실상 표준으로 자리 잡았다고 생각합니다. 가능한 한 Discourse에도 SVG 지원이 도입되기를 바랍니다.

다른 해결책에 대한 제안도 환영합니다.

1개의 좋아요

이제 사이트 로고로 SVG 파일을 사용할 수 있습니다. 예를 들어, 메타에 표시된 로고가 SVG 파일입니다. 다른 파일 형식을 업로드할 수 있는 별도의 digest logo 설정도 있습니다.

2개의 좋아요

아, 정말 부끄럽네요. 제 SVG 파일에 문제가 있는 것 같습니다. 다른 것으로 시도해 보니 작동했어요. 도움 주셔서 감사합니다 :slight_smile:

2개의 좋아요