> ## Documentation Index
> Fetch the complete documentation index at: https://gloflow.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Image storage

Image **Storage**

* should peers that belong to the decentralized image store be required to store data on IPFS?
  * to take advantage of content addressing
  * to allow for replication of data accross IPFS nodes?

* IPFS backend for image storage should be prioritized

* crawler subsystem should be migrated to the Image storage abstraction layer as soon as possible.

* flow->backend(s3/ipfs/etc.) mapping should not be staticly defined (as currently it is via YAML config file), and instead it should be dynamically settable by node operators/users
  * possibly operators should be able to enable this for users on node-startup (if for example they want to force users to only use s3 storage, or IPFS, etc.)

image storage:

* this represents storage of image that is expected to be durrable in some way
* does not include temporary storage of images on the local FS (workspace)

***

functions that do persistent image storage:

GF\_GIF\_LIB

* gf\_apps/gf\_images\_lib/gf\_gif\_lib/gf\_gif.go
  * Process\_and\_upload()
  * gif\_\_s3\_upload\_preview\_frames()
  * Gif\_\_frames\_\_save\_to\_fs()

GF\_IMAGES\_CORE

* gf\_apps/gf\_images\_lib/gf\_images\_core/gf\_images\_s3.go
  * S3\_\_store\_gf\_image()        - uploads both main GF transformed image
  * S3\_\_store\_gf\_image\_thumbs() - uploads thumbs

GF\_IMAGES\_JOBS\_CORE

* gf\_apps/gf\_images\_lib/gf\_images\_jobs\_core/gf\_jobs\_pipeline.go
  * job\_\_pipeline\_\_process\_image\_uploaded()
  * job\_\_pipeline\_\_process\_image\_extern()

GF\_IMAGES\_SERVICE

* gf\_apps/gf\_images\_lib/gf\_images\_service/gf\_image\_upload.go
  * S3\_\_get\_image\_s3\_filepath()

GF\_CRAWL\_CORE

* gf\_apps/gf\_crawl\_lib/gf\_crawl\_core/gf\_crawl\_images\_flows.go
  * S3\_\_get\_image\_original\_file\_s3\_filepath()
  * S3\_\_get\_image\_thumbs\_s3\_filepaths()
  * S3storeImage()

* gf\_apps/gf\_crawl\_lib/gf\_crawl\_core/gf\_crawl\_images\_s3.go
  * S3storeImage()

***

functions that use local temporary workspace FS storage:

GF\_IMAGE\_EDITOR

* gf\_apps/gf\_images\_lib/gf\_image\_editor/gf\_image\_editor.go
  * save\_edited\_image()
