summaryrefslogtreecommitdiff
path: root/packages/integrations/vercel/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/vercel/README.md')
-rw-r--r--packages/integrations/vercel/README.md26
1 files changed, 25 insertions, 1 deletions
diff --git a/packages/integrations/vercel/README.md b/packages/integrations/vercel/README.md
index 00c2a18cf..db3a52a03 100644
--- a/packages/integrations/vercel/README.md
+++ b/packages/integrations/vercel/README.md
@@ -137,7 +137,7 @@ export default defineConfig({
**Available for:** Serverless, Static
**Added in:** `@astrojs/vercel@3.3.0`
-When enabled, an [Image Service](https://docs.astro.build/en/reference/image-service-reference/) powered by the Vercel Image Optimization API will be automatically configured and used in production. In development, a built-in Squoosh-based service will be used instead.
+When enabled, an [Image Service](https://docs.astro.build/en/reference/image-service-reference/) powered by the Vercel Image Optimization API will be automatically configured and used in production. In development, the image service specified by [`devImageService`](#devimageservice) will be used instead.
```js
// astro.config.mjs
@@ -172,6 +172,30 @@ import astroLogo from '../assets/logo.png';
/>
```
+### devImageService
+
+**Type:** `'sharp' | 'squoosh' | string`<br>
+**Available for:** Serverless, Static
+**Added in:** `@astrojs/vercel@3.3.0`
+**Default**: 'sharp'
+
+Allows you to configure which image service to use in development when [imageService](#imageservice) is enabled. This can be useful if you cannot install Sharp's dependencies on your development machine, but using another image service like Squoosh would allow you to preview images in your dev environment. Build is unaffected and will always use Vercel's Image Optimization.
+
+It can also be set to any arbitrary value in order to use a custom image service instead of Astro's built-in ones.
+
+```js
+import { defineConfig } from 'astro/config';
+import vercel from '@astrojs/vercel/serverless';
+
+export default defineConfig({
+ output: 'server',
+ adapter: vercel({
+ imageService: true,
+ devImageService: 'squoosh',
+ }),
+});
+```
+
### includeFiles
**Type:** `string[]`<br>