-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web proxy usage with Imgix #2
Comments
With Imgix used as a proxy you need to provide the absolute URL to the image you want to proxy. You can do that at the template level (if you need to proxy multiple domains), or create a So for example you can have a config like this: return [
'my-proxy' => array(
'domain' => 'my-proxy-source.imgix.net',
'subfolder' => 'https://www.my-proxied-website.com/',
'key' => 'XXXXXXXXXXXX',
'defaultParams' => array(
'auto' => 'compress,format',
'fit' => 'crop',
'q' => '80'
)
),
)
]; And use like this in templates: {{'uploads/my-image.jpg' | imgix({ source:'my-proxy', ar:'3:2', w:1200, signed: true }) }} Or a config like this: return [
'my-proxy' => array(
'domain' => 'my-proxy-source.imgix.net',
'key' => 'XXXXXXXXXXXX',
'defaultParams' => array(
'auto' => 'compress,format',
'fit' => 'crop',
'q' => '80'
)
),
)
]; And use like this in templates: {{'https://www.my-proxied-website.com/uploads/my-image.jpg' | imgix({ source:'my-proxy', ar:'3:2', w:1200, signed: true }) }}
{{'https://www.another-proxied-website.com/uploads/another-image.jpg' | imgix({ source:'my-proxy', ar:'3:2', w:1200, signed: true }) }}
|
Ah, by using the subfolder setting! I should have realised. Thanks! |
How do I set up the config for this plugin to use Imgix with web proxy sources?
The text was updated successfully, but these errors were encountered: