Skip to content

Commit

Permalink
Update cloudflare.mdx (#6150)
Browse files Browse the repository at this point in the history
* Update cloudflare.mdx

* Update src/content/docs/en/guides/integrations-guide/cloudflare.mdx

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update cloudflare.mdx

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
  • Loading branch information
2 people authored and ematipico committed Jan 26, 2024
1 parent 5ed1af1 commit 41d1161
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/content/docs/en/guides/integrations-guide/cloudflare.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,27 @@ export default defineConfig({

<p>

**Type:** `'passthrough' | 'cloudflare'`<br />
**Type:** `'passthrough' | 'cloudflare' | 'compile'`<br />
**Default:** `'passthrough'`
</p>

Determines which image service is used by the adapter. The adapter will default to `passthrough` mode when an incompatible image service is configured. Otherwise, it will use the globally configured image service:

* **`cloudflare`:** Uses the [Cloudflare Image Resizing](https://developers.cloudflare.com/images/image-resizing/) service.
* **`passthrough`:** Uses the existing [`noop`](/en/guides/images/#configure-no-op-passthrough-service) service.
* **`compile`:** Uses Astro's default service (sharp), but only on pre-rendered routes at build time. During SSR for pages rendered on-demand, all `astro:assets` features are disabled.

```js title="astro.config.mjs" ins={6}
import {defineConfig} from "astro/config";
import cloudflare from '@astrojs/cloudflare';

export default defineConfig({
adapter: cloudflare({
imageService: 'cloudflare'
}),
output: 'server'
})
```

### `wasmModuleImports`

Expand Down

0 comments on commit 41d1161

Please sign in to comment.