🚀 New Release: Strapi AI Translations! Learn more

Strapi plugin logo for Simple WebP Converter

Simple WebP Converter

A simple Strapi plugin that converts images to WebP format.

strapi-plugin-webp-converter

A 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.

Supported Strapi versions

  • v5.x.x

NOTE: Strapi 4.x.x is not supported!

Installation

npm install strapi-plugin-webp-converter

or

yarn add strapi-plugin-webp-converter

Configuration

Enable the plugin

The 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
      },
    },
  },
});

Install now

npm install strapi-plugin-webp-converter

STATS

18 GitHub stars733 weekly downloads

Last updated

300 days ago

Strapi Version

5.1.1 and above

Author

github profile image for Daniel Nowak
Daniel Nowak

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.