npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

strapi-plugin-imgfmtconv

v1.0.1

Published

Universal image format converter for Strapi (WebP/AVIF, bulk, quality, fallback)

Readme

Strapi Image Format Converter Plugin

npm version License: MIT Strapi

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

Features

  • 🚀 Automatic conversion on file upload
  • 📦 Bulk conversion of existing files
  • 🎛️ Quality control for WebP and AVIF formats
  • 🔧 Flexible format selection (JPEG, PNG, GIF → WebP, AVIF)
  • 💾 Persistent settings (saved between restarts)
  • 🗑️ Automatic cleanup when original files are deleted
  • 📱 Admin panel integration with user-friendly interface
  • Performance optimized with Sharp library

Installation

npm install strapi-plugin-imgfmtconv

Or install from GitHub:

npm install github:A-mi13/imgfmtconv

Configuration

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

Available Settings

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

Example Configuration

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.

Usage

Admin Panel

  1. Navigate to Content ManagerImage Format Converter in your Strapi admin panel
  2. Configure your settings
  3. Use the bulk conversion feature to convert existing images

API Endpoints

Get Settings

GET /api/imgfmtconv/settings

Update Settings

PUT /api/imgfmtconv/settings
Content-Type: application/json

{
  "enabled": true,
  "autoConvert": true,
  "qualityWebp": 85,
  "qualityAvif": 75,
  "formatsToConvert": ["jpeg", "png"],
  "convertTo": ["webp"]
}

Reset to Defaults

POST /api/imgfmtconv/settings/reset

Reload Settings from File

POST /api/imgfmtconv/settings/reload

Bulk Convert Existing Images

POST /api/imgfmtconv/bulk-convert

How It Works

  1. Upload Detection: When a file is uploaded to Strapi, the plugin checks if it matches the configured source formats
  2. Conversion: Using Sharp library, the image is converted to the specified target formats
  3. Storage: Converted files are saved alongside the original with appropriate extensions
  4. Cleanup: When the original file is deleted, converted versions are automatically removed

Performance Benefits

  • WebP: 25-35% smaller than JPEG at equivalent quality
  • AVIF: 50% smaller than JPEG at equivalent quality
  • Automatic format selection: Modern browsers automatically choose the best format
  • Fallback support: Original formats are preserved for older browsers

Browser Support

| Format | Chrome | Firefox | Safari | Edge | |--------|--------|---------|--------|------| | WebP | 23+ | 65+ | 14+ | 18+ | | AVIF | 85+ | 93+ | 16.4+ | 85+ |

Requirements

  • Node.js >= 18.0.0
  • Strapi >= 5.0.0
  • Sharp library (automatically installed)

Development

# 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-imgfmtconv

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Changelog

v1.0.0

  • Initial release
  • WebP and AVIF conversion support
  • Admin panel integration
  • Bulk conversion feature
  • Persistent settings