Closed hongc-cc closed 3 years ago
Seconded - wondering how I can retcon and use srcset with imgix here. Thanks!
This is already possible, just not documented.
{{ entry.text
| retconSrcset(
[
{width: 375},
{width: 480},
{width: 768}
],
'img',
'(min-width: 40em) 80vw, 100vw',
true,
{ ratio: 16/9 },
{ imgixProfile: 'proxy' }
) }}
The fifth parameter is Imager's transform defaults, the sixth is Imager config overrides.
Worth noting that Retcon gets the parsed URLs from Craft, so you need to use an Imgix source/profile that is a "Web Proxy" for it to work with Imgix.
Retcon use the default imager config for image transform.
Any chance we can pass imager config / imgixProfile etc in the code?