Packages

@nuxt/image

2.2.1 · 30 Oct 2026MIT817.3k / weekRepositoryHomepagenpmAtom feed

Your version

2.1.0

28 Jul 2026Where it was published

2.2.1 is the newest release of 2.x.

In short

1 removed1 security30 new17 fixed42 internal

  • Removed

    Remove deprecated github silent config

  • Security

    Stronger SVG security: SVG sanitization now always runs, regardless of optimization settings. This fixes a potential XSS vector where svgo: false would return untouched SVGs. The sanitizer now removes SMIL attribute injection, foreign content (<foreignObject>, <iframe>, etc.), and unsafe URIs across all elements

Release note

v2.1.0 is the next minor release.

Highlights

Nuxt Image 2.1 ships eight new image providers, a major upgrade to our image processing engine, and a bunch of fixes across existing providers.

IPX v4

Under the hood, we've upgraded to IPX v4 which brings significant improvements:

  • Smaller bundles: IPX is now ESM-only with reduced dependency size

  • Security

    Stronger SVG security: SVG sanitization now always runs, regardless of optimization settings. This fixes a potential XSS vector where svgo: false would return untouched SVGs. The sanitizer now removes SMIL attribute injection, foreign content (<foreignObject>, <iframe>, etc.), and unsafe URIs across all elements

  • New image modifiers: opacity, brightness, saturation, hue, lightness, autoorient, dilate, erode, clahe, and linear

  • Better error messages: Invalid modifier arguments now return 400 errors with clear messages instead of cryptic 500s

  • Custom URL parsing: IPX now supports custom URL formats via the parseURL option

New Providers

This release adds support for eight new image optimization services:

Provider Improvements

  • Directus: Added support for sharp transforms and a key modifier for named presets

  • Sanity: Support for absolute URLs with automatic project/dataset extraction (#2274), and a configurable baseURL for custom CDN setups

  • AWS Amplify & Vercel: minimumCacheTTL is now configurable

Type Exports

NuxtImgProps and NuxtPictureProps are now exported from the runtime, making it easier to type your own components that wrap <NuxtImg> or <NuxtPicture> (#2115).

import type { NuxtImgProps, NuxtPictureProps } from '#image'

Changelog

compare changes

Enhancements

  • deps: migrate to ipx v4

  • provider: add EdgeOne Pages provider

  • imgproxy: add provider

  • directus: add sharp transforms & key modifier

  • sanity: support absolute URLs with project and dataset extraction

  • awsAmplify,vercel: make minimumCacheTTL configurable

  • sanity: add configurable baseURL option to Sanity provider

  • runtime: export Picture and Image props types

  • umbraco: add image provider

  • flyimg: add Flyimg built-in provider

  • cloudflareimages: add new provider

  • builderio: add Builder.io Image API provider

  • picsum: add Lorem Picsum placeholder image provider

  • supabase: add image provider

Fixes

  • flyimg: encode all # characters in color values

  • Remove duplicated provider key in generated image options

  • nuxt-picture: align preload link type with unhead v3

  • umbraco: shallow clone modifiers before modifying

  • cloudflare: add baseURL for urls with no operations

  • nuxt-img: set imagesrcset preload when densities are set w/o sizes

  • fastly: handle absolute URLs and merge preexisting query params

  • ipx: merge user-defined runtimeConfig.ipx with defaults

  • directus: add withoutEnlargement modifier type

  • shopify: merge preexisting query params with modifiers

  • Reduce max-width breakpoint values by 1px

  • netlifyImageCdn,netlifyLargeMedia: set netlify remote_images config

  • Deduplicate formats

  • Sanitise custom provider import names

  • Guard access from layer.config.image

  • bunny: merge query params with existing image src

  • Do not shadow custom provider types with builtins

  • nuxt-picture: allow data-* in imgAttrs

  • Resolve public/ dir in relation to rootDir

Chore

  • Removed

    Remove deprecated github silent config

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.