strapi-plugin-img-convert
v2.0.0
Published
Converts media uploads to any sharp supported format such as webp or avif
Downloads
446
Maintainers
Readme
strapi-plugin-img-convert
A Strapi plugin that enhances the built-in upload functionality by automatically converting uploaded images into formats like WebP and AVIF.
Requirements
- Strapi V5.x.x
- Node.js 18.x or higher
- Access to edit config/plugins.js|ts
NOTE: Strapi 4.x.x is not supported!
Installation
npm install strapi-plugin-img-convertor
yarn add strapi-plugin-img-convertUsage
- Install the plugin using npm or yarn
- Configure the plugin by adding the following to your
config/plugins.jsfile:
module.exports = {
upload: {
enabled: true,
config: {
breakpoints: {
xlarge: { breakpoint: 1566, formats: ['webp', 'jpeg', 'png'] },
large: { breakpoint: 1280, formats: ['webp', 'jpeg', 'png'] },
medium: { breakpoint: 768, formats: ['webp', 'jpeg', 'png'] },
small: { breakpoint: 640, formats: ['webp', 'jpeg', 'png'] },
},
},
},
};Note: Legacy configuration formats are still supported for backward compatibility.
Support
For issues and feature requests, please create an issue on our GitHub repository.
License
MIT
