Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support Cloudflare Images #12

Description

@johneatmon

/https?:\/\/(?<host>[^\/]+)\/cdn-cgi\/image\/(?<transformations>[^\/]+)\/(?<path>.*)$/g;

I believe that Cloudflare images, when served via a custom domain, are delivered with:

https://example.com/cdn-cgi/imagedelivery/<ACCOUNT_HASH>/<IMAGE_ID>/<VARIANT_NAME>

Correct me if I'm wrong, but I believe this RegEx is only checking for /cdn-cgi/image rather than /cdn-cgi/imagedelivery. Would also be great to also check for the default Cloudflare image delivery URL if you're not using a custom domain:

https://imagedelivery.net/<ACCOUNT_HASH>/<IMAGE_ID>/<VARIANT_NAME>

Link to relevant docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions