0

When rendering a SVG image in Org mode, it shows a colored rectangle.
Used org-toggle-inline-images to show the image.

enter image description here

Ok... now downloading this image, it gets correctly rendered by Emacs and in an Org-mode file:

enter image description here

(image-type-available-p 'svg) returns t (See Detecting availability of SVG?).

So... why the first SVG image is not correctly shown?
It is perfectly shown in other apps like Chrome browser.

nephewtom
  • 2,219
  • 17
  • 29
  • Is your Emacs built with SVG support? Download an SVG from the web and try to open it in Emacs with `C-x C-f`. If you cannot see the image, then your Emacs does not support SVG. If you can, then further debugging is warranted. Please post your findings *in your question*, not as a comment. – NickD Feb 14 '23 at 13:26
  • So what happens when you open the image with `C-x C-f`? Do you see it or do you see the rectangle? IOW, the question is: is the problem with Emacs displaying SVG files or is the problem with Org mode toggling inline images? Does a PNG image work (try it both ways)? – NickD Feb 14 '23 at 14:32
  • Something wrong with the image perhaps? Different apps have different tolerances for problems in the file: Chrome may be tolerant but the SVG library on your system may not be. You can pastebin the image somewhere and let people try it out. – NickD Feb 14 '23 at 15:06
  • It seem that the SVG image not showing has JPEG inside encoded in base64. Not sure if that could be the cause that Emacs is not rendering it. – nephewtom Feb 14 '23 at 15:59
  • It could be or it could be something else. Where did you get the broken SVG? If it's up on the Web, can you provide a URL? We can then test it independently. – NickD Feb 14 '23 at 21:39
  • Unfortunately, can't provide it because it was generated by other person in the company, and it is confidential... Sorry! – nephewtom Feb 14 '23 at 21:44
  • Ok - unless somebody constructs such an SVG file, that leaves no options for outsiders to help. – NickD Feb 14 '23 at 21:52

0 Answers0