By Sirv
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.
released July 1, 2026
npm install @sirv/strapi-pluginAdd 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.mdfor the roadmap.
npm install @sirv/strapi-pluginEnable 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.
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.
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>;^5.0.0>=20^18 || ^19, @strapi/design-system v2pnpm --filter @sirv/strapi-plugin build # build to dist/
pnpm --filter @sirv/strapi-plugin typecheck
pnpm --filter @sirv/strapi-plugin testThe package builds with @strapi/sdk-plugin into
dist/admin and dist/server, exposed via the ./strapi-admin and ./strapi-server package
exports.
MIT
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
