diff --git a/docs/content/1.docs/2.features/image.md b/docs/content/1.docs/2.features/image.md new file mode 100644 index 00000000..3a176944 --- /dev/null +++ b/docs/content/1.docs/2.features/image.md @@ -0,0 +1,88 @@ +--- +title: Image Transformation +navigation.title: Image +description: Add image transformation to your NuxtHub project. +--- + +## Getting Started + +Enable the image transformation in your NuxtHub project by adding the `image` property to the `hub` object in your `nuxt.config.ts` file. + + +```ts [nuxt.config.ts] +export default defineNuxtConfig({ + hub: { + image: { + trustedDomains: ['hub.nuxt.com'], + templates: { + small: { width: 128, height: 128, format: 'webp' }, + medium: { width: 512, height: 512, format: 'webp' } + } + } + } +}) +``` + +NuxtHub will add an specific route to your project to transform the image. The route is `/_hub/image/