Do I need to pass the entire R2 url to cloudflare images resizing?

I want to use cloudflare images with R2 for storage, and I am using the https://{DOMAIN}/cdn-cgi/image/{OPTIONS}/{SOURCE} format I am passing the entire public R2 url as the source, is this how I am supposed to do this?
4 Replies
Chaika
Chaika8mo ago
You usually want to just use an R2 Custom Domain, and then you can just run image resizing on that same domain using a relative path
guy
guyOP8mo ago
@Chaika I'm using a custom domain already, i have domain.com registered on CF and cdn.domain.com points to my r2 Do you mean remove the subdomain and pass the image path after?
Chaika
Chaika8mo ago
No, keep the subdomain, just make sure you have that domain enabled under Image -> Transformations for resizing Then you can just use it to resize, ex an image on https://cdn.domain.com/myimage.png could be resized via https://cdn.domain.com/cdn-cgi/image/width=1800,quality=75,format=auto/myimage.png or you can give it the full url, like https://cdn.domain.com/cdn-cgi/image/width=1800,quality=75,format=auto/https://cdn.domain.com/myimage.png
guy
guyOP8mo ago
Ahh got you that makes a lot more sense, thanks !!
Want results from more Discord servers?
Add your server