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:,dpr=1,trim=0;1202;0;1337,f=auto,dpr=2,trim=0;1202;0;1337,f=auto,dpr=3,trim=0;1202;0;1337,f=auto

This shouldn’t work, but does:,dpr=1,trim=0;1202;0;1337,f=auto,dpr=2,trim=0;601;0;665,f=auto,dpr=3,trim=0;401;0;450,f=auto


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