Cloudflare images trim properties not supported in URL

Hi all,

We’re implementing cloudflare images. Currently working on our user-inputted crops using the trim-property.

I think we’re experiencing a bug. We’re trying to use
trim.width=678
trim.height=678
trim.left=30
trim.top=40

as described in the docs [Preformatted text](https://developers.cloudflare.com/images/image-resizing/url-format/#trim) in a flex-variant url. But we’re getting a malformed URL error.
Eg: [Preformatted text](https://imagedelivery.net/dL48lUskIPeXKLEzEqoydg/80bab59f-061f-4641-906b-dff5da99a300/trim.width=500,trim.height=400,trim.top=20,trim.left=10)

Is this a bug in the migration/merge of cloudflare image optimization into cloudflare images, or are we messing something up?

Thanks!

Steven

It does look a little confusing. I’m not sure the URL syntax has changed. The documentation certainly doesn’t reflect a merging of syntax.

Out of curiosity, did you already opt into the new pricing model?

We started out with - and have always used - the ‘cloudflare images’ pricing (€5 + €1 /100K delivered).

https://imagedelivery.net/dL48lUskIPeXKLEzEqoydg/80bab59f-061f-4641-906b-dff5da99a300/trim=100;100;100;500

Does work. But is less desirable for us. We use CropperJS and using

trim.width=678
trim.height=678
trim.left=30
trim.top=40

Is easier and requires less workaround. As we can start from the giving X,Y coordinate and then just input the giving width and height without having to do our own calculations to determine distance from right and botom borders.

Ah I see that I linked the wrong docs in my original post. Although the content is the same.
The Cloudflare Images docs tells me that

trim.width=678
trim.height=678
trim.left=30
trim.top=40

Is supported:

For Image Resizing and Cloudflare Images, use as four numbers in pixels separated by a semicolon, in the form of top;right;bottom;left or via separate values trim.width ,trim.height , trim.left ,trim.top .

[type or paste code here](https://developers.cloudflare.com/images/cloudflare-images/transform/flexible-variants/#trim)

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