Config

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:

Content providers

{
    "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]"
            }
        }
    }
}

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.

Last updated