Registry / devops / webpack-images-resizer

webpack-images-resizer

JSON →
library0.1.3jsnpmunverified

Webpack plugin that resizes images during build using Jimp. Version 0.1.3 — appears to be a single release with no updates since 2018. Allows specifying source-to-destination mappings and resize options (width, height, quality, format, cropping, optional TinyPNG compression). Distinct from other image plugins by supporting both fixed and percentage dimensions and optional TinyPNG integration. However, it is a very low-usage package with no recent maintenance, no TypeScript types, and uses an outdated CommonJS API.

npm install webpack-images-resizer
INSTALL
IMPORT
SIG · WEBPACK-IMAGES-RES
W
webpack-images-resizer
devopsjavascriptv0.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WebpackImagesResizer
const WebpackImagesResizer = require('webpack-images-resizer');
import WebpackImagesResizer from 'webpack-images-resizer';
Package exports a CommonJS class. ESM import may fail.
WebpackImagesResizer (default)
const WebpackImagesResizer = require('webpack-images-resizer');
const { WebpackImagesResizer } = require('webpack-images-resizer');
The default export is the class itself, not a named export. Destructuring will result in undefined.
WebpackImagesResizer (ESM)
const WebpackImagesResizer = require('webpack-images-resizer');
import { WebpackImagesResizer } from 'webpack-images-resizer';
Package has no ESM support. Any import statement will fail.

Shows Webpack configuration using WebpackImagesResizer with a list of image source/destination and resize option.

const path = require('path'); const WebpackImagesResizer = require('webpack-images-resizer'); let list = []; list.push({src: path.resolve(__dirname, 'assets/1.png'), dest: 'assets/1.png'}); list.push({src: path.resolve(__dirname, 'assets/2.png'), dest: 'assets/2.png'}); // You can also specify a directory list.push({src: path.resolve(__dirname, 'assets/dir'), dest: 'assets/dir'}); module.exports = { entry: ['./src/index'], output: {filename: 'index.js'}, mode: 'development', plugins: [ new WebpackImagesResizer(list, {width: '50%'}) ] };
Debug
Known issues
deprecatedPackage has not been updated since 2018 and uses outdated dependencies (e.g., Jimp v0.6).
fix
Consider using more modern alternatives like imagemin-webpack-plugin or sharp-based loaders.
affects: 0.1.3
gotchaThe plugin uses Jimp for image processing, which may have performance issues with large images.
fix
Use sharp or other performant libraries for production workloads.
affects: *
gotchaThe plugin does not support Webpack 5 natively; tapAsync API may not be compatible.
fix
If using Webpack 5, you may need to patch the plugin or switch to a maintained alternative.
affects: *
Errors
Common errors & fixes
TypeError: WebpackImagesResizer is not a constructor
Likely using ESM import or destructuring require incorrectly.
fix
Use `const WebpackImagesResizer = require('webpack-images-resizer');`
Module not found: Error: Can't resolve 'tinify'
TinyPNG key not set correctly or tinify package not installed.
fix
Install tinify: `npm install tinify` and set `tinifyKey` option.
Upgrade
Version history
0.1.3latest on npm
Audit
Dependencies
chokidarrequiredFile watching for changes
jimprequiredImage processing (resize, crop, format conversion)
tinifyoptionalOptional TinyPNG compression
Agent activity
4 hits · last 30 days
node
4
Resources
webpack-images-resizer — npm install webpack-images-resizer · libregistry