diff --git a/netbox_topology_views/utils.py b/netbox_topology_views/utils.py index 687dba4..c288880 100644 --- a/netbox_topology_views/utils.py +++ b/netbox_topology_views/utils.py @@ -29,9 +29,8 @@ else: def image_static_url(path: Path) -> str: - return static( - f"/{path.relative_to(Path(settings.STATIC_ROOT))}" - ) + # No leading slash: static file finders (e.g. the debug toolbar's) reject absolute paths. + return static(path.relative_to(Path(settings.STATIC_ROOT)).as_posix()) def get_image_from_url(url: str) -> str: