Providers

Cloudflare Images

Source
Nuxt Image has first class integration with Cloudflare Images.

Integration between Cloudflare Images and the image module.

This provider is for Cloudflare Images — the image hosting and delivery product where you upload images to Cloudflare and reference them by image ID. If you want to transform images on your own domain using Cloudflare Image Transformations (via /cdn-cgi/image/), use the cloudflare provider instead.

Setup

You need your account hash, which you can find in the Cloudflare dashboard under Images > Overview > Developer Resources.

nuxt.config.ts
export default defineNuxtConfig({
  image: {
    cloudflareimages: {
      accountHash: 'YOUR_ACCOUNT_HASH'
    }
  }
})

Images are referenced by their image ID (not a URL path):

<NuxtImg
  provider="cloudflareimages"
  src="083eb7b2-5392-4565-b69e-aff66acddd00"
  width="400"
  height="300"
/>

Options

accountHash

Required. Your Cloudflare Images account hash.

baseURL

Default: https://imagedelivery.net/

The base URL for image delivery. You can change this if you are serving images through a custom domain.

Variants vs. flexible transformations

Cloudflare Images supports two ways of serving images:

  1. Named variants — Predefined sizes configured in the Cloudflare dashboard (e.g. public, thumbnail). Use the variant modifier.
  2. Flexible variants — On-the-fly transformations using width, height, fit, etc. This must be enabled in your Cloudflare Images dashboard.

When you pass a variant modifier or no image modifiers at all, the provider uses the variant URL format. Otherwise, it uses flexible variant transformations.

<!-- Uses the 'public' variant (default when no modifiers) -->
<NuxtImg provider="cloudflareimages" src="my-image-id" />

<!-- Uses a named variant -->
<NuxtImg
  provider="cloudflareimages"
  src="my-image-id"
  :modifiers="{ variant: 'thumbnail' }"
/>

<!-- Uses flexible variants (requires enablement in dashboard) -->
<NuxtImg
  provider="cloudflareimages"
  src="my-image-id"
  width="400"
  height="300"
  fit="cover"
/>

Modifiers

On top of the standard modifiers, the following Cloudflare Images-specific modifiers are supported when using flexible variants:

ModifierDescription
variantNamed variant to use (e.g. public, thumbnail). Takes priority over other modifiers.
dprDevice pixel ratio multiplier.
gravityCropping gravity: auto, face, left, right, top, bottom.
sharpenSharpen amount (0-10).
rotateRotation angle: 90, 180, or 270.
brightnessBrightness adjustment.
contrastContrast adjustment.
gammaGamma adjustment.
saturationSaturation adjustment.
anim'true' or 'false' — whether to preserve animation frames.
metadataMetadata handling: copyright, keep, or none.
compressionSet to 'fast' for faster compression.
flipFlip image: h (horizontal), v (vertical), or hv (both).
zoomZoom factor for use with gravity: 'face' (0-1).

fit

ValueCloudflare behavior
coverImage covers the box, cropping if necessary.
containImage fits inside the box, preserving aspect ratio.
fillPads the image to fill the box.
outsideCrops the image to fill the box.
insideScales down to fit, never enlarging.
Copyright © 2026