Integration between Cloudinary and the image module.
To use this provider you just need to specify the base URL of your project in Cloudinary.
export default defineNuxtConfig({
  image: {
    cloudinary: {
      baseURL: 'https://res.cloudinary.com/<your-cloud-name>/image/upload'
    }
  }
})
To handle remote image data, you can either use fetch or upload.
Consult the Cloudinary documentation for the difference between the two.
export default defineNuxtConfig({
  image: {
    cloudinary: {
      baseURL: 'https://res.cloudinary.com/<your-cloud-name>/image/fetch'
    }
  }
})
<NuxtImg
  provider="cloudinary"
  src="https://upload.wikimedia.org/wikipedia/commons/a/ae/Olympic_flag.jpg"
  width="300"
  height="200"
/>
Note: You will need to configure your 'Allowed fetch domains' to do the above.
export default defineNuxtConfig({
  image: {
    cloudinary: {
      baseURL: 'https://res.cloudinary.com/<your-cloud-name>/image/upload/<mapping-folder>'
    }
  }
})
<NuxtImg
  provider="cloudinary"
  src="/commons/a/ae/Olympic_flag.jpg"
  width="300"
  height="200"
/>
Note: You will need to configure your 'Auto upload mapping' to do the above.
fit valuesBeside the standard values for fit property of Nuxt image and Nuxt picture, Cloudinary offers the following for extra resizing experience:
minCover - Same like cover but only resizing if the original image is smaller than the given minimum (width and height).minInside - Same as the inside mode but only if the original image is smaller than the given minimum (width and height).coverLimit - Same as the cover mode but only if the original image is larger than the given limit (width and height)thumbnail- Generate a thumbnail using face detection.cropping - Used to extract a given width & height out of the original image. The original proportions are retained.Check out Cloudinary resize mode Documentation for more details.
Beside the standard modifiers, you can also pass the following Cloudinary-specific transformation params to modifiers prop.
rotateAccepted values:
auto_right | auto_left | ignore | vflip | hflipTo rotate or flip a given asset by certain degrees, or automatically based on orientation.
roundCornerRound the specified corners of the desired image. If pass only a number or max (all corners will be applied). The syntax for other use cases is as below:
top_left_bottom_right_radius:top_right_bottom_left_radius(Example: 20:40)top_left:top_right_bottom_left:bottom_right (Example: 20:30:40)top_left:top_right:bottom_left:bottom_right (Example: 20:0:40:40)<NuxtImg
  provider="cloudinary"
  src="/remote/nuxt-org/blog/going-full-static/main.png"
  width="300"
  height="169"
  :modifiers="{ roundCorner: 'max' }"
/>
gravityDetemine which part of the image to cropped or to place the overlay.
Accepted values: auto, subject, face, sink, faceCenter, multipleFaces, multipleFacesCenter, north, northEast, northWest, west, southWest, south, southEast, east, center
<NuxtImg
  provider="cloudinary"
  src="/remote/nuxt-org/blog/going-full-static/main.png"
  width="300"
  height="300"
  fit="fill"
  :modifiers="{ gravity: 'subject' }"
/>
effectApply a filter or an effect on the desired asset. See Effects for images for the full list of syntax and available effects.
<NuxtImg
  provider="cloudinary"
  src="/remote/nuxt-org/blog/going-full-static/main.png"
  width="300"
  height="300"
  fit="fill"
  :modifiers="{ effect: 'grayscale' }"
/>
colorColor to use when text captions, shadow effect and colorize effect are in use.
<NuxtImg
  provider="cloudinary"
  src="/remote/nuxt-org/blog/going-full-static/main.png"
  width="300"
  :modifiers="{ effect: 'colorize:50', color: 'red' }"
/>
flagsOne of more flags to alter the default transformation behavior. See Flags for Images for more information.
dprThe target device pixel ratio for the asset. auto means automatically matching the DPR settings in user's device.
opacityAdjust the opacity of the desired image. Scale: 0 to 100 (%).
<NuxtImg
  provider="cloudinary"
  src="/remote/nuxt-org/blog/going-full-static/main.png"
  width="300"
  :modifiers="{ opacity: 50 }"
/>
overlayCreate a layer over the base image. This can be use with x, y, gravity to customize the position of the overlay.
<template>
  <NuxtImg
    provider="cloudinary"
    src="/remote/nuxt-org/blog/going-full-static/main.png"
    width="100"
    height="100"
    fit="thumb"
    :modifiers="modifiers"
  />
</template>
<script setup lang="ts">
const modifiers = {
  gravity: 'north',
  overlay: 'text:default_style:Hello+World'
}
</script>
See Overlay Documentation for more information.
underlayCreate a layer below a partial-transparent image. This can be use with x, y, gravity to customize the position of the overlay.
transformationA pre-defined named transformation to apply to the asset.
zoomUse together with fit='crop' or fit='thumb' to decide how much of original image/video surronding the face to keep using face detection.
<template>
  <NuxtImg
    provider="cloudinary"
    src="/remote/nuxt-org/blog/going-full-static/main.png"
    width="100"
    height="100"
    fit="thumb"
    :modifiers="modifiers"
  />
</template>
<script setup lang="ts">
const modifiers = {
  zoom: 0.75,
  gravity: 'face'
}
</script>
colorSpaceColor space to use for the delivery image URL. See Color space Documentation for accepted values details.
<NuxtImg
  provider="cloudinary"
  src="/remote/nuxt-org/blog/going-full-static/main.png"
  width="300"
  :modifiers="{ colorSpace: 'srgb' }"
/>
customFuncCall a custom function on Cloudinary side. See Custom Functions for more details.
densityTo define the density number when converting a vector file to image format.
aspectRatioTo crop or resize the asset to a new aspect ratio, for use with a crop/resize mode that determines how the asset is adjusted to the new dimensions.