Registry / storage / strapi-plugin-media-webp-convertor

strapi-plugin-media-webp-convertor

JSON →
library1.0.0jsnpmunverified

Strapi 5 plugin that automatically converts uploaded images (JPEG, PNG, GIF, BMP, TIFF, HEIC) to WebP format using sharp. Provides an admin UI for retroactive conversion of existing media with bulk processing, progress tracking, storage savings reports, and migration helpers for S3 and database URL updates. Current version 1.0.0, requires Strapi 5.x and Node ≥18. Differentiator: tight integration with Strapi's upload lifecycle and admin panel, no frontend changes needed, supports S3 migration and URL rewriting.

npm install strapi-plugin-media-webp-convertor
INSTALL
IMPORT
SIG · STRAPI-PLUGIN-MEDI
S
strapi-plugin-media-webp-convertor
storagejavascriptv1.0.0
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.

default
// No JS import needed; configure in config/plugins.ts // config/plugins.ts export default { 'strapi-media-webp-convertor': { enabled: true }, };
const plugin = require('strapi-plugin-media-webp-convertor');
Plugin is configured via Strapi's plugin config, not imported directly in code.
TypeScript types (if any)
// No exported types at v1.0.0
Plugin does not export any symbols for direct import; configuration is done in Strapi config files.

Shows installation and basic configuration to auto-convert uploads to WebP in Strapi 5.

// 1. Install the plugin npm install strapi-plugin-media-webp-convertor // 2. Create or edit config/plugins.ts: export default { 'strapi-media-webp-convertor': { enabled: true, }, }; // 3. Restart Strapi. Upload an image via admin panel → automatically converted to WebP.
Debug
Known issues
gotchaRich text / WYSIWYG fields that contain hard-coded image URLs will NOT be updated automatically after conversion. Use the URL migration tab to fix those.
fix
After converting existing images, go to Settings → Media WebP & migration → URL migration to rewrite hard-coded image URLs in rich text fields.
affects: >=1.0.0
gotchaThe plugin uses lossy WebP by default. For PNG files with transparency, enable lossless mode in the bulk conversion UI to avoid quality loss. Lossless WebP can be larger than lossy.
fix
When converting existing images, check the 'Lossless mode for PNGs' checkbox in the admin UI to preserve pixel-perfect transparency.
affects: >=1.0.0
gotchaBulk conversion processes up to 5,000 files per run in batches of 10. For very large libraries, you may need to run conversion multiple times.
fix
Run the conversion multiple times. Already converted files will be skipped.
affects: >=1.0.0
Errors
Common errors & fixes
sharp: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found
System's libstdc++ version is too old for sharp's prebuilt binaries.
fix
Install a newer version of libstdc++: sudo apt-get update && sudo apt-get install libstdc++6
Error: Cannot find module '@strapi/strapi' while loading strapi-plugin-media-webp-convertor
Strapi 5 is not installed or peer dependency mismatch.
fix
Ensure Strapi 5.x is installed: npm install @strapi/strapi@^5.0.0
TypeError: Cannot read properties of undefined (reading 'convert')
sharp is not installed or not properly installed.
fix
Install sharp: npm install sharp@>=0.30.0
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
sharprequiredImage conversion engine required for WebP encoding
@strapi/strapirequiredCore Strapi framework, peer dependency version 5.x
reactrequiredAdmin panel UI requires React 18
Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
strapi-plugin-media-webp-convertor — npm install strapi-plugin-media-webp-convertor · libregistry