Webpack loader to resize imported images using sharp. Supports JPEG, PNG, WebP, AVIF, and TIFF formats. Current stable version is 5.0.0. Released as needed, with breaking changes in v4 and v5. Key differentiators: lightweight (no sharp dependency included), works with webpack 4/5, supports query string overrides for per-import resizing. Unlike other image loaders, it does not bundle sharp itself, so users must install sharp separately. Comparable to sharp-loader but focused solely on resize operations.
npm install webpack-image-resize-loaderVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic webpack configuration to resize all imported images to max width 1000px, and how to override options per import.
Run 'npm install --save-dev sharp' after updating to v4.
Update Node to >=10.13.0.
Add format: 'webp' or format: 'png' in options or query.
Set type: 'javascript/auto' in the rule definition.
Use 'width' or 'height' instead of 'scale'.
npm install --save-dev sharp
Place 'file-loader' first in the 'use' array.
Provide at least one of 'width', 'height', or 'scale' in loader options or query string.
No dependency data recorded yet.