Easy Image

The Easy Image feature is included in the On-Premises server and it is possible to use this feature to upload and store images.

Full documentation of this feature can be found here.

The Easy Image feature has no smaller possibilities than in the SaaS version. However, it must be properly configured.
At the moment Easy Image feature supports several drivers to store images in different locations.

There is support for:

The On-Premises Easy Image does not store images in CDN as the SaaS version does.

# Configurations

To configure the Easy Image feature you need to set the appropriate environment variables.

STORAGE_DRIVER                           - optional (default: "filesystem")
STORAGE_LOCATION                         - optional (default: "/var/cs/easyimage", required for file system driver)
STORAGE_REGION                           - optional (required for AWS S3 driver)
STORAGE_ACCESS_KEY_ID                    - optional (required for AWS S3 driver)
STORAGE_SECRET_ACCESS_KEY                - optional (required for AWS S3 driver)
STORAGE_BUCKET                           - optional (required for AWS S3 driver)
STORAGE_ENDPOINT                         - optional
STORAGE_ACCOUNT_NAME                     - optional (required for Azure Blob Storage driver)
STORAGE_ACCOUNT_KEY                      - optional (required for Azure Blob Storage driver)
STORAGE_CONTAINER                        - optional (required for Azure Blob Storage driver)

# File system (default)

To save images using the file system, set the (storage_driver) driver to filesystem and specify the path (storage_location).

If you run several instances of the application and use a load balancer to split traffic between instances, you must remember that the images should be saved in one shared place. You can use an NFS disk or other solution.

STORAGE_DRIVER=filesystem
STORAGE_LOCATION=/var/cs/easyimage

You should always mount volume /path/to/your/dir:/var/cs/easyimage to preserve uploaded files in case your container gets removed.

The STORAGE_LOCATION variable specifies the path to save images, but this is the path in the container. Therefore, the path to the mounted volume should be given.

# AWS S3

To save images in the AWS S3, set driver (storage_driver) to s3 and specify the configuration to AWS S3. To configure AWS S3, provide data for the following variables:

  • storage_region - the region to send service requests to,

  • storage_access_key_id - your AWS access key ID,

  • storage_secret_access_key - your AWS secret access key,

  • storage_endpoint - the endpoint URI to send requests to. For example, services compatible with S3 can be used (eg. MinIO, localstack, etc.). The endpoint must specify its protocol e.g. s3://, https://, etc.
    By default, it is generated in a format https://s3.[STORAGE_REGION].amazonaws.com

STORAGE_DRIVER=s3
STORAGE_REGION=[AWS_REGION]
STORAGE_ACCESS_KEY_ID=[AWS_ACCESS_KEY_ID]
STORAGE_SECRET_ACCESS_KEY=[AWS_SECRET_ACCESS_KEY]
STORAGE_BUCKET=[AWS_S3_BUCKET]
STORAGE_ENDPOINT=[AWS_S3_ENDPOINT]

# Azure Blob Storage

To save images in the Azure Blob Storage, set the (storage_driver) driver to azure and specify the configuration to Azure Blob Storage. To configure Azure Blob Storage, provide data for the following variables:

  • storage_account_name - your Azure account name,

  • storage_account_key - your Azure account key,

  • storage_container - your Azure Blob Storage container name.

  • storage_endpoint - the endpoint URI to send requests to. The endpoint must specify its protocol e.g. https://.
    By default, it is generated in a format https://[STORAGE_ACCOUNT_NAME].blob.core.windows.net

STORAGE_DRIVER=azure
STORAGE_ACCOUNT_NAME=[AZURE_ACCOUNT_NAME]
STORAGE_ACCOUNT_KEY=[AZURE_ACCOUNT_KEY]
STORAGE_CONTAINER=[AZURE_CONTAINER]
STORAGE_ENDPOINT=[AZURE_ENDPOINT]

# Database

To save the images in the SQL database, set the driver only. The images will be saved in a database configured by database configuration.

STORAGE_DRIVER=database