Ad

SVG Image Map In Wordpress - Hyperlinks Do Not Work

- 1 answer

I am trying to set up an interactive map the visitor can use to navigate through scientific methodes. The SVG works flawlessly but Wordpress disables the hyperlinks within the image. I know this is due to security but I still want to get this going. Any ideas how this could work?

Link of Page

Link of Image

Embedding: ImageMap

Would appreciate any help. Also I am no learned programmer, so I need a while to wrap my head around stuff.

Cheers

Ad

Answer

When an SVG is embedded as an <img>, it is embedded as a bitmap. Any animation or interaction, such as links, are lost.

The normal solution is to embed your SVG as an <object> instead. However I am not an expert on Wordpress, so I can't offer advice on how to do that part.

Ad
source: stackoverflow.com
Ad