guideEasy 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 this moment Easy Image feature supports a few 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 for the Docker version, set the appropriate environment variables. However, to configure this feature for the Node.js version you need to modify the configuration file (config.json).

Information on how to set up the configuration for the Docker version is here and for the Node.js version here.

Below are sample driver configurations for the Docker and Node.js versions.

# File system

To save images using the file system, set driver (storage_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.

Also, you can use another driver such as AWS S3, Azure Blob Storage or MySQL.

# Docker

STORAGE_DRIVER=filesystem
STORAGE_LOCATION=/var/cs/easyimage

You should always mount the docker volume -v /path/to/your/dir:/var/cs/easyimage to preserve uploaded files in case your Docker 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.

# Node.js

The configuration should be added to the config.json file.

{
    // mysql_host, etc ...

    "storage_driver": "filesystem",
    "storage_location": "/var/cs/easyimage"

    // ...
}

# 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, can be used, services compatible with S3 (eg. MinIO, localstack, etc.).

# Docker

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

# Node.js

The configuration should be added to the config.json file.

{
    // mysql_host, etc ...

    "storage_driver": "s3",
    "storage_region": "[AWS_REGION]",
    "storage_access_key_id": "[AWS_ACCESS_KEY_ID]",
    "storage_secret_access_key": "[AWS_SECRET_ACCESS_KEY]",
    "storage_endpoint": "[AWS_S3_ENDPOINT]",

    // ...
}

# Azure Blob Storage

To save images in the Azure Blob Storage, set driver (storage_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.

# Docker

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

# Node.js

The configuration should be added to the config.json file.

{
    // mysql_host, etc ...

    "storage_driver": "azure",
    "storage_account_name": "[AZURE_ACCOUNT_NAME]",
    "storage_account_key": "[AZURE_ACCOUNT_KEY]",
    "storage_container": "[AZURE_CONTAINER]",
    "storage_endpoint": "[AZURE_ENDPOINT]",

    // ...
}

# MySQL

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

# Docker

STORAGE_DRIVER=database

# Node.js

The configuration should be added to the config.json file.

{
    // mysql_host, etc ...

    "storage_driver": "database"

    // ...
}