
By Daniel Nowak
A simple Strapi plugin that converts images to WebP format.
released March 10, 2025
npm install strapi-plugin-webp-converterA plugin for Strapi that automatically converts uploaded images to the WebP format using the sharp library. It ensures that your images are optimized for web performance by leveraging the benefits of the WebP format.
NOTE: Strapi 4.x.x is not supported!
npm install strapi-plugin-webp-converteror
yarn add strapi-plugin-webp-converterThe plugin configuration is stored in a config file located at ./config/plugins.js|ts.
Javascript configuration
module.exports = ({ env }) => ({
// ...
'webp-converter': {
enabled: true,
config: {
// mimeTypes that converts to WebP. Default is ['image/png', 'image/jpeg', 'image/jpg']
mimeTypes: undefined,
options: {
// WebP options: https://sharp.pixelplumbing.com/api-output#webp
},
},
},
});or
Typescript configuration
export default () => ({
// ...
'webp-converter': {
enabled: true,
config: {
// mimeTypes that converts to WebP. Default is ['image/png', 'image/jpeg', 'image/jpg']
mimeTypes: undefined,
options: {
// WebP options: https://sharp.pixelplumbing.com/api-output#webp
},
},
},
});Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
