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

sanity-plugin-media-elux

v1.0.4

Published

This version of `sanity-plugin-media` is for Sanity Studio V3.

Readme

Sanity Media Plugin - Electrolux Version (for Sanity Studio v3)

This plugin is for Sanity Studio v3.
This is a forked version of Sanitys own Media Plugin (v4.0.0)

What is it?

A Sanity Studio v3 plugin that extends media handling capabilities with custom enhancements, based on a fork of an original plugin by Sanity.io.

A convenient way to browse, manage and refine your Sanity assets.

Use it standalone as a browser, or optionally hook it up as a custom asset source and use it to power both image and file selection too.

Grid view Default grid view

Asset details tab | Asset alt texts tab :-------------------------:|:-------------------------: first | second

Features

Manage and organise your assets

  • Support for batch uploads with drag and drop support
  • Edit text fields native to Sanity's asset documents, such as title, description, altTexts and originalFilename
  • View asset metadata and a limited subset of EXIF data, if present
  • Tag your assets individually or in bulk
  • Manage tags directly within the plugin
  • Get previews for audio and video files
  • Easily select and delete multiple assets in bulk

Granular search tools

  • Refine your search with any combination of search facets such as filtering by tag name, asset usage, file size, orientation, type (and more)
  • Use text search for a quick lookup by title, description and alt text

Built for large datasets and collaborative editing in mind

  • Virtualized grid + tabular views for super speedy browsing, even with thousands of assets and tags
  • Utilises Sanity's real time updates for live changes from other studio members

Fits right in with your Sanity studio

Added support for multi-language alt texts

  • Define a list of available languages to enable multi-language alt texts for assets.
  • See example of how to enable this feature here.

Install (Sanity Studio v3)

In your Sanity project folder:

npm install --save sanity-plugin-media

or

yarn add sanity-plugin-media

Usage

Add it as a plugin in your sanity.config.ts (or .js) file:

import {media} from 'sanity-plugin-media'

export default defineConfig({
  // ...
  plugins: [
    media(      
      languages: [
        { code: 'en-US', title: 'English', default: true },
        { code: 'sv-SE', title: 'Swedish' },
        { code: 'fr-FR', title: 'French' },
        { code: 'de-DE', title: 'German' }
      ],
    )
  ]
})

This will enable the Media plugin as both a standalone tool (accessible in your studio menu) and as an additional asset source for your image and file fields.

Customizing the asset source

You can configure your studio to use this asset source either exclusively, or conditionally enable it based on the type of asset (image or file).

import {media, mediaAssetSource} from 'sanity-plugin-media'

export default defineConfig({
  // ...
  plugins: [media()],
  form: {
    // Don't use this plugin when selecting files only (but allow all other enabled asset sources)
    file: {
      assetSources: previousAssetSources => {
        return previousAssetSources.filter(assetSource => assetSource !== mediaAssetSource)
      }
    }
  }
})

Plugin Config

// sanity.config.ts
export default defineConfig({
  //...
  plugins: [
    media({
      // { code: string; title: string, default?: boolean }[] - the list of languages used for alt texts
      // NOTE! Set only one language to default: true. 
      languages: [
        { code: 'en-US', title: 'English', default: true },
        { code: 'sv-SE', title: 'Swedish' },
        { code: 'fr-FR', title: 'French' },
        { code: 'de-DE', title: 'German' }
      ],
      creditLine: {
        enabled: true,
        // boolean - enables an optional "Credit Line" field in the plugin.
        // Used to store credits e.g. photographer, licence information
        excludeSources: ['unsplash'],
        // string | string[] - when used with 3rd party asset sources, you may
        // wish to prevent users overwriting the creditLine based on the `source.name`
      },
      maximumUploadSize: 10000000
      // number - maximum file size (in bytes) that can be uploaded through the plugin interface
    })
  ],
})

Develop locally

Test your plugin locally

In the plugin directory run this command:

npm run link-watch

This will set up your plugin to build whenever the code changes, and publish the package to a local yalc repository.

In the command log, there should be a note that reads something like this:

npx yalc add sanity-plugin-media-elux && npx yalc link sanity-plugin-media-elux && npm install

Run this command in the studio project directory and you should see something like this in the package.json file:

"sanity-plugin-media-elux": "file:.yalc/sanity-plugin-media-elux",

Which means you can safely use the local version of the plugin with this import:

import { media } from 'sanity-plugin-media-elux'