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

v1.0.1

Published

Automatic image optimization, WebP conversion, and custom responsive sizes for Strapi v5

Readme

strapi-media-toolkit

A Strapi v5 plugin for automatic image optimization, WebP conversion, and custom responsive image generation.

Features

  • Image Optimization — Automatically compress JPEG, PNG, WebP, AVIF, TIFF, and GIF uploads with configurable quality
  • WebP Conversion — Convert uploaded images to WebP format for smaller file sizes
  • Custom Responsive Sizes — Define your own named image sizes (width, height, fit mode) beyond Strapi's defaults
  • AWS S3 Offloading — Optionally offload media files to an S3 bucket with custom domain support
  • Admin UI — Manage all settings directly from the Strapi admin panel

Requirements

  • Strapi v5
  • Node.js >= 18

Installation

npm install strapi-media-toolkit

Setup

1. Register the plugin

Add the following to your Strapi project's config/plugins.ts:

import type { Core } from '@strapi/strapi';

const config = ({ env }: Core.Config.Shared.ConfigParams): Core.Config.Plugin => ({
  'strapi-media-toolkit': {
    enabled: true,
  },
});

export default config;

2. Rebuild the admin panel

npm run build

AWS S3 Provider (Optional)

If you want new uploads to go directly to S3 (or a compatible provider), install the Strapi S3 provider and extend the config above with an upload block:

npm install @strapi/provider-upload-aws-s3
import type { Core } from '@strapi/strapi';

const config = ({ env }: Core.Config.Shared.ConfigParams): Core.Config.Plugin => ({
  upload: {
    config: {
      provider: 'aws-s3',
      providerOptions: {
        baseUrl: env('AWS_CDN_URL'),
        accessKeyId: env('AWS_ACCESS_KEY_ID'),
        secretAccessKey: env('AWS_ACCESS_KEY_SECRET'),
        region: env('AWS_REGION'),
        params: {
          ACL: 'private',
          Bucket: env('AWS_BUCKET'),
        },
      },
      actionOptions: {
        upload: {},
        uploadStream: {},
        delete: {},
      },
      breakpoints: {
        large: 1000,
        medium: 750,
        small: 500,
      },
    },
  },
  'strapi-media-toolkit': {
    enabled: true,
  },
});

export default config;

Add the corresponding variables to your .env:

AWS_ACCESS_KEY_ID=your_access_key
AWS_ACCESS_KEY_SECRET=your_secret_key
AWS_REGION=us-east-1
AWS_BUCKET=your_bucket_name
AWS_CDN_URL=https://your-cdn-or-bucket-url.com

The upload block is only needed if you want new uploads routed to S3. Without it, files are stored locally and you can still use the Offload feature in the admin panel to migrate existing local files to S3 at any time.

Configuration

All settings are managed through the Media Toolkit section in the Strapi admin panel. No manual config file required.

Optimization Settings

| Setting | Default | Description | |---------|---------|-------------| | Enabled | true | Enable/disable image optimization on upload | | Quality | 80 | Compression quality (1–100) | | Convert to WebP | true | Convert images to WebP format | | WebP Quality | 80 | WebP compression quality (1–100) | | Preserve Original | true | Keep the original file alongside optimized version |

Default Image Sizes

| Name | Width | Height | Fit | |------|-------|--------|-----| | thumbnail | 245 | 245 | cover | | small | 500 | 500 | inside | | medium | 750 | 750 | inside | | large | 1000 | 1000 | inside |

You can add, edit, or remove sizes from the Image Sizes page in the admin panel. Supported fit modes: cover, contain, inside, outside, fill.

Admin API

| Method | Path | Description | |--------|------|-------------| | GET | /api/strapi-media-toolkit/settings | Get all settings | | PUT | /api/strapi-media-toolkit/settings | Update settings | | POST | /api/strapi-media-toolkit/settings/reset | Reset to defaults | | GET | /api/strapi-media-toolkit/image-sizes | List image sizes | | POST | /api/strapi-media-toolkit/image-sizes | Create image size | | PUT | /api/strapi-media-toolkit/image-sizes/:id | Update image size | | DELETE | /api/strapi-media-toolkit/image-sizes/:id | Delete image size |

License

MIT