Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions src/content/docs/images/transform-images/bindings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,33 @@ Wrangler supports two different versions of the Images API:

To test the high-fidelity version of Images, you can run `wrangler dev`:

```txt
```sh
npx wrangler dev
```

This creates a local-only environment that mirrors the production environment where Cloudflare runs the Images API. You can test your Worker with all available transformation features before deploying to production.

To test the low-fidelity offline version of Images, add the `--experimental-images-local-mode` flag:
To test the low-fidelity offline version of Images, add the `--experimental-images-local-mode` flag when running `wrangler dev`:

```txt
```sh
npx wrangler dev --experimental-images-local-mode
```

Or, set the `imagesLocalMode` experimental option to `true` in your Vite config if you are using the Cloudflare Vite plugin:

```ts
import { cloudflare } from "@cloudflare/vite-plugin";
import { defineConfig } from "vite";

export default defineConfig({
plugins: [
cloudflare({
experimental: { imagesLocalMode: true },
}),
],
});
```

Currently, this version supports only `width`, `height`, `rotate`, and `format`.

When testing with the [Workers Vitest integration](/workers/testing/vitest-integration/), the low-fidelity offline version is used by default, to avoid hitting the Cloudflare API in tests.