Image Content Provider Agent (ICP) - Infomaker/Dashboard-Plugin GitHub Wiki

Image Content Provider (ICP) Agent

Version: 1.1.0

Description

ICP containing functionality to create specific image sources

Installation & Configuration

Install

in your dashboard go to > plugins > install plugin >

https://plugins-prod.s3-eu-west-1.amazonaws.com/se-infomaker-icp/1-0-0

Configure

The plugin needs to be configured with endpoints, providers, and functions.

  • go to Plugins > ICP Agent > settings
  • add your own config inside the configEditor field

Example config:

{
    "contentProviders": {
        "imengine-provider": {
            "type": "imengine",
            "endpoint": "https://domain/imengine/image.php",
            "functions": {
                "default": {
                    "template": "uuid=[identifier]&type=[type:preview]&function=hardcrop&width=[width]&height=[height]&q=80"
                },
                "thumbnail": {
                    "template": "uuid=[identifier]&type=[type:preview]&function=thumbnail&width=[width]&height=[height]&q=80"
                },
                "crop": {
                    "template": "uuid=[identifier]&type=[type:preview]&function=cropresize&width=[width]&height=[height]&x=[x:0.5]&y=[y:0.5]&crop_w=400&crop_h=300&q=80"
                }
            }
        },
        "imgix-with-signature-provider": {
            "type": "imgix",
            "endpoint": "https://domain.imgix.net",
            "token": "TOKEN-GOES-HERE-FOR_SIGNATURE-IMGIX",
            "functions": {
                "default": {
                    "template": "[identifier]?w=[width]&h=[height]&s=[signature]"
                },
                "crop": {
                    "template": "[identifier]?w=[width]&h=[height]&fit=crop&crop=faces&s=[signature]"
                }
            }
        }
    }
}

dashboard-icp-agent

Functions

Functions are a way to configure new image functions into the plugin. This can later be used by different plugins. The criteria is that each function at least contains a "default" function as a fallback.

Template strings

The strings are built upon known structure for the specific service and should be the query strings of each services without the starting "?". Each parameter is build with a key=[value] structure where value can be followed by a :optional argument. Example: key[value:optional] where optional is a default value if non is passed to the specific function.

Develop with ICP Agent

Use ICP Agent with your Plugin