Cloudflare images flex variant property execution order | trim & DPR bug?

Hi all,

We’re wondering if the execution order of properties of flex variant images (via url) is documented somewhere.

For example. I would expect it to be:
source image → trim → width/height → dpr
But in practice it appears to be
source image → dpr → trim → width/height

This also seems to be at odds with the documentation for cloudflare images, which states “Takes dpr into account.”.
So this feels like a bug.

We can work around this with some code (compensating for the dpr ourselves). But when this will be fixed our workaround will result in broken images…

This should work, but doesn’t:


https://imagedelivery.net/dL48lUskIPeXKLEzEqoydg/77310c77-493c-42db-5464-ec9aaa79fc00/w=414,dpr=1,trim=0;1202;0;1337,f=auto
https://imagedelivery.net/dL48lUskIPeXKLEzEqoydg/77310c77-493c-42db-5464-ec9aaa79fc00/w=414,dpr=2,trim=0;1202;0;1337,f=auto
https://imagedelivery.net/dL48lUskIPeXKLEzEqoydg/77310c77-493c-42db-5464-ec9aaa79fc00/w=414,dpr=3,trim=0;1202;0;1337,f=auto

This shouldn’t work, but does:

https://imagedelivery.net/dL48lUskIPeXKLEzEqoydg/77310c77-493c-42db-5464-ec9aaa79fc00/w=414,dpr=1,trim=0;1202;0;1337,f=auto
https://imagedelivery.net/dL48lUskIPeXKLEzEqoydg/77310c77-493c-42db-5464-ec9aaa79fc00/w=414,dpr=2,trim=0;601;0;665,f=auto
https://imagedelivery.net/dL48lUskIPeXKLEzEqoydg/77310c77-493c-42db-5464-ec9aaa79fc00/w=414,dpr=3,trim=0;401;0;450,f=auto

Anyone?

This topic was automatically closed after 15 days. New replies are no longer allowed.