Remote Images
Use remote images in local development
Last modified: December 29, 2024
Extension name
t2/remote-images
WARNING: Do NOT activate this extension if the legacy Dekode Remote Images plugin
is enabled.
Required settings example (t2.json)
{
"t2/remote-images": {
"remoteBaseUrl": "https://example.com/"
}
}
Alternatively, you can use the DEKODE_PREPEND_IMAGE_URL
env variable to set
the remote base url.
Full example (t2.json) with default values
{
"t2/remote-images": {
"remoteBaseUrl": "https://example.com/",
"remoteContentFolder": "wp-content",
"checkLocalFiles": true,
"subDomainSupport": false,
"enabledEnvironments": ["local", "development"]
}
}
Schema definition for t2/remote-images properties
{
"t2/remote-images": {
"type": "object",
"properties": {
"remoteBaseUrl": {
"type": "string",
"description": "The remote base url, i.e. https://www.example.com/."
},
"remoteContentFolder": {
"type": "string",
"description": "The remote content folder name, i.e. wp-content."
},
"checkLocalFiles": {
"type": "boolean",
"description": "Whether to look for local files before fetching remote ones (true) or not (false).",
"default": true
},
"subDomainSupport": {
"type": "boolean",
"description": "Whether to include subdomains (true) in url conversions or not (false).",
"default": false
},
"enabledEnvironments": {
"type": "array",
"description": "A list of environments where this feature is enabled",
"default": ["local", "development"],
"uniqueItems": true,
"items": {
"enum": ["local", "development", "staging", "production"]
}
}
},
"additionalProperties": false
}
}