Skip to content
Docs

Changelog

New updates and improvements at Cloudflare.

Cloudflare Images
hero image
  1. Custom flow configuration panel

    Flows are automated rules that pair conditions (such as file extension, URL path, or query parameter) with parameters. Set up a flow to automatically apply image optimization to matching requests on your zone without writing code or changing URLs.

    There are two modes for transformation flows:

    • Provider flows — Migrate from another image optimization service. Your existing URLs continue to work while Cloudflare rewrites provider-specific parameters to their Cloudflare equivalents. Currently, Cloudflare supports provider flows for Fastly Image Optimizer.
    • Custom flows — Define your own conditions and actions for use cases like automatic format conversion, responsive sizing with width=auto, or directory-based optimization.

    To get started, go to Images > Transformations > Automation in the Cloudflare dashboard.

    Learn more about transformation flows.

  1. You can use Images to ingest HEIC images and serve them in supported output formats like AVIF, WebP, JPEG, and PNG.

    When inputting a HEIC image, dimension and sizing limits may still apply. Refer to our documentation to see limits for uploading to Images or transforming a remote image.

  1. You can now interact with the Images API directly in your Worker.

    This allows more fine-grained control over transformation request flows and cache behavior. For example, you can resize, manipulate, and overlay images without requiring them to be accessible through a URL.

    The Images binding can be configured in the Cloudflare dashboard for your Worker or in the Wrangler configuration file in your project's directory:

    JSONC
    {
    "images": {
    "binding": "IMAGES", // i.e. available in your Worker on env.IMAGES
    },
    }

    Within your Worker code, you can interact with this binding by using env.IMAGES.

    Here's how you can rotate, resize, and blur an image, then output the image as AVIF:

    TypeScript
    const info = await env.IMAGES.info(stream);
    // stream contains a valid image, and width/height is available on the info object
    const response = (
    await env.IMAGES.input(stream)
    .transform({ rotate: 90 })
    .transform({ width: 128 })
    .transform({ blur: 20 })
    .output({ format: "image/avif" })
    ).response();
    return response;

    For more information, refer to Images Bindings.