
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
sanity-plugin-media-elux
Advanced tools
This version of `sanity-plugin-media` is for Sanity Studio V3.
This plugin is for Sanity Studio v3.
This is a forked version of Sanitys own Media Plugin (v4.0.0)
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.
Default grid view
| Asset details tab | Asset alt texts tab |
|---|---|
title, description, altTexts and originalFilenameIn your Sanity project folder:
npm install --save sanity-plugin-media
or
yarn add sanity-plugin-media
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.
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)
}
}
}
})
// 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
})
],
})
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'
FAQs
This version of `sanity-plugin-media` is for Sanity Studio V3.
We found that sanity-plugin-media-elux demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.