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

@sirv/strapi-plugin

v0.1.0

Published

Add Sirv as a media source inside Strapi v5: connect your account, browse the Sirv DAM, and pick images, videos, 360 spins or views. Assets stay on Sirv and render on the frontend with @sirv/react.

Readme

@sirv/strapi-plugin

Add Sirv as a media source inside Strapi v5: connect your account, browse the Sirv DAM, and pick images, videos, 360 spins or views. Assets stay on Sirv and render on the frontend with @sirv/react.

Status: milestone 1 (scaffold). See the repo root strapi-plugin.md for the roadmap.

Install

npm install @sirv/strapi-plugin

Enable it in config/plugins.ts:

export default {
  sirv: { enabled: true },
};

Restart Strapi. You will see a Sirv entry in the admin sidebar and a Sirv section under Settings.

Allow Sirv assets in your Content-Security-Policy

Strapi's admin sets a strict CSP that blocks external images. Sirv delivers assets from *.sirv.com (or your custom domain), so extend strapi::security in config/middlewares.ts, otherwise DAM thumbnails and previews are blocked:

export default [
  'strapi::logger',
  'strapi::errors',
  {
    name: 'strapi::security',
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          'img-src': ["'self'", 'data:', 'blob:', 'market-assets.strapi.io', 'https://*.sirv.com'],
          'media-src': ["'self'", 'data:', 'blob:', 'https://*.sirv.com'],
          'script-src': ["'self'", 'blob:', 'https://scripts.sirv.com', 'market-assets.strapi.io'],
        },
      },
    },
  },
  // ...the rest of the default middleware stack
];

Use your custom delivery domain instead of *.sirv.com if you have one.

Use the custom field

Add the sirv-media custom field to any content type (via the Content-Type Builder, or in schema):

{
  "attributes": {
    "hero": {
      "type": "customField",
      "customField": "plugin::sirv.sirv-media",
      "options": { "allowedTypes": ["image", "video"] }
    }
  }
}

Editors see a "Pick from Sirv" button that opens the DAM browser; picking an asset stores a SirvFieldValue (a discriminated union over image | video | spin | view).

That stored value is exactly what @sirv/react consumes - render it directly, no converter:

import { SirvProvider, SirvMedia } from '@sirv/react';

// `article.hero` is the stored sirv-media value
<SirvProvider>
  <SirvMedia value={article.hero} width={800} />
</SirvProvider>;

Requirements

  • Strapi ^5.0.0
  • Node >=20
  • React ^18 || ^19, @strapi/design-system v2

Develop (from the monorepo)

pnpm --filter @sirv/strapi-plugin build       # build to dist/
pnpm --filter @sirv/strapi-plugin typecheck
pnpm --filter @sirv/strapi-plugin test

The package builds with @strapi/sdk-plugin into dist/admin and dist/server, exposed via the ./strapi-admin and ./strapi-server package exports.

License

MIT