WireViz icon indicating copy to clipboard operation
WireViz copied to clipboard

[Feature] Images as URLs for easy external HTML integration

Open julled opened this issue 3 months ago • 1 comments

Hey, first of all big thanks for this beautiful tool. This helps alot documenting our cable mess :)

I was writing a plugin for wikijs using wireviz-web based rendering: https://github.com/requarks/wiki/pull/7811 It allows to inline define a wireviz documentation inline in markdown and automatically generate a wireviz html to be inlined into the wiki.

I was wondering how it would be possible to embedd images via url instead of using images only from harddisk.

I see two options to handle image urls:

  1. Download images to a cache and use them
  2. Add option to avoid download and include them as urls into HTML (and SVG?) to avoid download

What do you think?

julled avatar Oct 10 '25 09:10 julled

I don't think option 2 is possible because WireViz uses Graphviz for the rendering job, and Graphviz only supports local image files. I believe I read in an old Graphviz issue that this is an intentional restriction to avoid any (cross site) security issues when running as part of an online service. By implementing option 1 within WireViz, such potential security issues might arise for WireViz too.

It might be safer to handle any downloads in your application outside WireViz to avoid adding potential security risks in applications belonging to other WireViz users.

kvid avatar Oct 12 '25 08:10 kvid