
By Alexander
Automatically convert uploaded images to WebP/AVIF, optimize quality, and manage formats in Strapi. Bulk convert, persistent settings, easy setup
released July 24, 2025
npm install strapi-plugin-imgfmtconvA powerful Strapi plugin for automatic image format conversion to modern formats like WebP and AVIF. Optimize your images for better performance and smaller file sizes.
npm install strapi-plugin-imgfmtconvOr install from GitHub:
npm install github:A-mi13/imgfmtconvThe plugin comes with a default config/settings.json file included in the repository. You can edit this file to set up your preferred options before starting Strapi.
| Setting | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Enable/disable the plugin |
autoConvert | boolean | true | Auto-convert on file upload |
qualityWebp | number | 80 | WebP quality (0-100) |
qualityAvif | number | 70 | AVIF quality (0-100) |
formatsToConvert | array | ['jpeg', 'png', 'jpg', 'gif'] | Source formats to convert |
convertTo | array | ['webp', 'avif'] | Target formats |
The default file looks like this:
{
"enabled": true,
"autoConvert": true,
"qualityWebp": 80,
"qualityAvif": 50,
"formatsToConvert": ["jpeg", "png"],
"convertTo": ["webp", "avif"]
}You can edit config/settings.json directly or via the admin panel.
GET /api/imgfmtconv/settingsPUT /api/imgfmtconv/settings
Content-Type: application/json
{
"enabled": true,
"autoConvert": true,
"qualityWebp": 85,
"qualityAvif": 75,
"formatsToConvert": ["jpeg", "png"],
"convertTo": ["webp"]
}POST /api/imgfmtconv/settings/resetPOST /api/imgfmtconv/settings/reloadPOST /api/imgfmtconv/bulk-convert| Format | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| WebP | 23+ | 65+ | 14+ | 18+ |
| AVIF | 85+ | 93+ | 16.4+ | 85+ |
# Clone the repository
git clone https://github.com/A-mi13/imgfmtconv.git
# Install dependencies
npm install
# Link to your Strapi project
npm link
cd /path/to/your/strapi/project
npm link strapi-plugin-imgfmtconvgit checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
