cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

No images in local browser guide

d_holtman
Node

For a presentation I created a browser guide.
I used the tutorial at: Tutorial: Create a Custom Browser Guide - Developer Guides
I downloaded the example from : GitHub - neo4j-contrib/neo4j-guides: Tooling to create Neo4j Browser Guides from AsciiDoc Content
I cloned the respository
I added my html browser guide to the html directory and added my images to the img directory.
Finally I started the local server.

All well!
However when I do:

:play http://localhost:8001/html/a_guide.html

the browser guide shows, however the images do not show.

I use local images which are stored in the img directory in the same root as the html directory.
I use

<img src="../img/<name name.pgn" alt="image name" height="300">

The image file names contain NO spaces.

Further I tested the webpage itself by pasting the URL in my browser directly and then the images are shown. So the same web server does recognize the images and shows them.
But not inside the Neo4J browser..
I tested both in Firefox and Chrome

I'm running the Enterprise version 4.3.1.
The instance has no internet connection.
type or paste code here

1 REPLY 1

abk
Neo4j
Neo4j

Hi @d.holtman ,

When Browser loads a remote guide from a URL, it fetches the HTML and places the content inside a browser frame. The constainer is not in an iframe, so any image references must use fully-qualified URLs instead of relative URLs, because relative URLs would be resolved relative to whatever is hosting Browser itself (either Desktop, or Neo4j DBMS, or Aura).

For an example of a remote guide with fully qualified URLs, take a look at the source of https://guides.neo4j.com/northwind/index.html

Possibly Neo4j Browser could rewrite URLs as part of the post-processing when it loads a guide. If you think that's a good idea, could you post to https://neo4j-browser.canny.io ?

Best,
ABK