Skip to main content
Studio can deliver different media roles through different providers while keeping one library, its original disks and its existing editor references. A thumbnail can use one CDN, a video another, and downloads can remain on the application server. Delivery is optional and disabled by default. No CDN account, bucket or public hostname is created automatically. The application first checks workspace membership, permissions, the source and the selected version. It then either streams the object or returns a private, non-cacheable redirect to its configured provider. Listing a library does not contact the CDN or sign a URL for every card.

Choose the access model

A transfer already in progress cannot be taken back. None of these modes prevents someone from saving content they were allowed to preview. CDN cache invalidation does not replace access checks.

Configure profiles

Add this section to config/media-studio.php, preserving your other settings:
Use real hostnames matching the URLs generated by your S3 disk. S3-compatible endpoints and path-style URLs can use their own explicit allowed host. The S3 adapter requires Laravel’s native S3 filesystem adapter; it is not installed automatically for applications that only use local disks. Signing does not fetch the file from S3. The url represents the root of that Laravel disk as exposed by the CDN. Include any required CDN prefix. Studio URL-encodes each object path segment and does not concatenate an arbitrary caller-supplied URL. Production delivery requires HTTPS. Credentials stay in server configuration and must not be committed to your repository or sent to the frontend.

Override a role

Precedence is global role, disk, workspace, preset, then optional resolver. Explicit server keeps that resource on Studio. Different roles may share one profile; you do not need duplicate configuration for identical providers. For application-specific choices, implement DeliveryProfileResolver::resolve(DeliveryResource $resource): ?string and register its class as delivery.resolver. Return the name of an existing profile or null to retain the mapping. Keep this decision local and bounded; do not scan storage or call a remote service for every request.

CloudFront

Read CloudFront delivery.

Bunny

Read Bunny delivery.

Cloudflare Worker with private R2

Read Cloudflare Worker and private R2.

Downloads and browser playback

S3 and the supplied Worker set content disposition explicitly. Other providers keep downloads on Studio unless their profile explicitly sets download_headers => true. Set that only after configuring and testing attachment response headers at the origin/CDN. Unsupported active inline formats, including HTML and SVG, retain Studio’s attachment handling. Long-running video players may request additional ranges after a signed URL expires. Choose an appropriate video TTL (maximum 3600 seconds), or keep video on server when it must remain valid for the authenticated session. Existing SDK/editor URLs continue to point to the Studio broker rather than persisting temporary addresses. Applications must not store the final redirect URL as the durable asset identity. Configure CDN CORS for your exact application origin, including Range and exposed Content-Range/Content-Length/Content-Disposition headers. Credentialed browser requests require explicit origin support. Update your application’s img-src, media-src and connect-src CSP directives. Studio’s standalone guest page permits configured delivery origins for its thumbnails.

Existing conversions and custom providers

The same broker runs after authorization for native renditions, directly projected Spatie conversions, external rendition providers, editor rendition links, originals, guest media and prepared archive results. It does not change which system owns or generates those files. Changes to files create new version keys; configure your CDN to retain the fmsv cache identity. For externally mutable storage, complete synchronization before expecting a new version to be delivered. Implement DeliveryAdapter::url(DeliveryResource $resource, array $profile, int $expiresAt): string and register the class under delivery.adapters to add another provider. Return an HTTPS URL on an allowed host. Do not perform remote I/O while generating it. Unknown profiles, invalid signatures and invalid configuration do not silently fall back to public access. No production provider credentials or CDN deployments are included in the package. Before enabling a profile, test its real origin mapping, CORS, cache policy, private origin protection, range playback and expiry on your deployment.