How to store/load images into Neo4j

Hello Community!

I hope you guys are doing well :). I am still learning NEO4j and wanted to reach out to you guys about storing images into NEO4j.

  1. What is the best practice when storing images?
    I found this post below, but I am not sure if this is recommended since I am new! any advice would be appreciated :slightly_smiling_face: (cypher - How to store images into Neo4j - Stack Overflow).

  2. How can I store image in binary format to GraphDB?
    (any suggestion would be greatly appreciated, thank you).

Thank you for your valuable time in advance.

Respectfully,

Petra

According to the Neo4j community:

  1. Don't add large blobs of data, e.g. base64, to the graph as property values . This is one of the few anti-use-cases for graph databases.
  2. Store the binary information somewhere, e.g. AWS S3 , and have a node representing that photo or video. That node contains the S3 URL as reference and potentially some meta-data as well (width, height, quality, codec).
  3. Use relationships to amend information like tagging, comments, ownership and permissions.
1 Like

Hi plee,

You can insert a property URL inside nodes.
If you show data in desktop browser the link is active and you can point to a (web)server.

example:
MATCH (U:User{name:'Alice'}) set U.url="<img src="https://placekitten.com/200/300\" alt="cat image"/>" return U

ciao

Alessio