Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Automatically optimizes images used in Nuxt.js projects (JPEG, PNG, SVG, WebP and GIF).
Nuxt Optimized Images is a build-time module for Nuxt.js that automatically optimizes images (JPEG, PNG, SVG, WebP, and GIF) when a project is built.
Nuxt Optimized Images is a Nuxt.js module published on npm under the @aceforth scope as @aceforth/nuxt-optimized-images. It takes the images referenced in a Nuxt.js project and produces optimized versions during the build, with smaller file sizes, optional WebP conversion, progressive rendering, and responsive resizing. The module is inspired by next-optimized-images, requires Node.js 10 or newer and Nuxt 2 or newer, and is currently in maintenance mode, meaning only bug fixes are being addressed.
?webp resource query, as long as the webp-loader package is installed.responsive-loader to resize images on the fly and generate multiple versions for a srcSet, requiring either jimp (slower, Node-based) or sharp (faster, binary) as an additional dependency.lqip-loader package, controlled with a resource query.srcSet versions for responsive galleries, automatically during each production build.Install the module with npm or yarn, add it to the buildModules section of nuxt.config.js, and set optimizedImages.optimizeImages to true. Then install the specific optimization packages you need (for example, imagemin-mozjpeg for JPEGs or webp-loader for WebP conversion); the module detects and uses any supported packages that are installed. By default, optimization runs only for production builds, but the optimizeImagesInDev configuration option enables it during development.
Yes, it is free and released under the MIT License, so it can be used in commercial and personal projects without a license fee.
JPEG, PNG, SVG, WebP, and GIF are supported, with optional loaders including imagemin-mozjpeg, imagemin-pngquant, imagemin-optipng, imagemin-gifsicle, imagemin-svgo, webp-loader, lqip-loader, responsive-loader, and sqip-loader.
No. The module only targets Nuxt 2 (and requires Nuxt 2 or newer) and is in maintenance mode. For Nuxt 3, the README suggests using the official Nuxt Image module at github.com/nuxt/image.
Images are not optimized unless you install the matching optimization packages. This is intentional to avoid forcing large libraries on all users. Once you install at least one package, the module detects and applies it.
Yes, but it is disabled by default. Set optimizedImages.optimizeImagesInDev to true in your Nuxt configuration to enable image optimization for development builds as well.
