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

datocms-plugin-sirv

v0.1.1

Published

Browse your Sirv account and pick images, videos, 360 spins, views and 3D models directly inside DatoCMS. Assets stay on Sirv and render with @sirv/react.

Readme

Sirv plugin for DatoCMS

Browse your Sirv account and pick images, videos, 360 spins, views and 3D models directly inside DatoCMS. Assets stay on Sirv and are delivered from Sirv's global CDN with on-the-fly optimization - records store a small, portable JSON value.

Features

  • Full DAM browser in a modal: folder navigation with breadcrumbs, account-wide search, type-filter chips, per-type thumbnails, live previews (including interactive 360 spins and 3D models), infinite scroll, create-folder and upload buttons.
  • Three field extensions:
    • Sirv media (JSON field) - a single image / video / 360 spin / view / 3D model, with inline alt & caption editing (auto-filled from Sirv metadata).
    • Sirv media list (JSON field) - a multi-select gallery with drag-to-reorder.
    • Sirv asset URL (string field) - any asset (including PDFs and other files) as a plain delivery URL.
  • Per-field type restrictions - limit a field to, say, images only.
  • Frontend-ready: render stored values with the @sirv/react package (responsive srcset, lazy loading, sirv.js auto-load for spins/views/models).

Setup

  1. Install the plugin from the DatoCMS Marketplace.
  2. Open Configuration -> Plugins -> Sirv and paste your Sirv REST Client ID and Client secret (create them at my.sirv.com -> Settings -> API), then pick a delivery domain if your account has several.
  3. Add a JSON field to a model, open its Presentation tab and choose Sirv media (or Sirv media list). For URL mode add a string field and choose Sirv asset URL.
  4. Optionally restrict the allowed asset types in the field's plugin settings.

Credentials note

Credentials are stored in the plugin's global parameters, which are visible to project collaborators who can load the plugin (and to Content Management API tokens that can read plugins). Use a dedicated Sirv REST key for the project; keys can be revoked any time at my.sirv.com.

Stored value

{
  "_type": "sirvMedia",
  "mediaType": "image",
  "sirvPath": "/products/shoe.jpg",
  "sirvAlias": "youralias.sirv.com",
  "originalUrl": "https://youralias.sirv.com/products/shoe.jpg",
  "bytes": 123456,
  "width": 1600,
  "height": 1000,
  "alt": "Red running shoe",
  "caption": ""
}

The same flat shape is used by the Sirv plugins for Sanity, Storyblok, Contentful, Strapi and Payload - one frontend renderer works across all of them:

import { SirvMedia, fromSanityMedia as fromStoredMedia } from '@sirv/react';

<SirvMedia value={fromStoredMedia(JSON.parse(record.heroMedia))} width={640} />

(DatoCMS returns JSON field values as strings in the GraphQL API - parse before rendering. See the example frontend.)

Support