cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to store/load images into Neo4j

plee
Node Clone

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 (https://stackoverflow.com/questions/26480557/how-to-store-images-into-neo4j).

  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

2 REPLIES 2

sameerG
Graph Buddy

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.

asperlinga
Graph Buddy

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