SVG Upload works, but broken url to image

This is a follow-up to my bugreport regarding [SVG Upload not working] (SVG Upload not working). Upload works now, the svg image size is stripped correctly. The problem appears after the upload, because the image cannot be loaded (shows broken link symbol instead).

Reproduce Steps:

  • update to latest commit
  • upload svg to new/old topic
  • preview should show the svg, but doesn’t. after saving the topic problem persists.
  • the file is uploaded correctly and exists in var/discourse/shared/standalone/uploads/default/original/1X/

Some speculation of mine:

  • looks like there is some mime-type mix-up. my chromium can’t show the svg in my discourse installation. but copying the image-url and pasting it into a new window starts downloading the file.
1 Like

Sure @zogstrip can you have a look?

SVGs are now first-class images :rocket:

https://github.com/discourse/discourse/commit/5e2545a578eabc8a52b9df3a64558f6d2bf2dfa2

6 Likes