Rendering SVG Images In Org Generated HTML

I’ve recently discovered to my surprise that rendering an SVG image in HTML from Org mode is difficult or at least poorly documented. It comes as news to me because the images that I want to render are always JPEGs so I’ve never stumbled on the problem.

It turns out that there are two solutions. The first, from Norman Walsh, converts the Org mode link to the SVG file into an HTML div containing the image. Unfortunately, Walsh doesn’t give any details.

The second solution, from tusharhero, leverages the Org Babel interface to make and display an SVG image. I like his solution better but that’s probably because it seems more familiar. It’s certainly what I would try to do if I didn’t have the advantage of Walsh’s and tusharhero’s wisdom.

As I said, I never deal with SVG images so there may be better ways of handling all this but here, at least, are two solutions in case you are having the same problem.

This entry was posted in General and tagged , . Bookmark the permalink.