From f0f922ee7081964afa518d4edc768a77e421218b Mon Sep 17 00:00:00 2001 From: Constantine Nathanson Date: Thu, 20 Aug 2026 15:34:07 +0300 Subject: [PATCH] docs: split transform-and-deliver into image and video pairs The doc covered both images and video, but the only runnable example was image-only, so cloudinary.video() was documented and never demonstrated. - rename transform-and-deliver-media.md to transform-and-deliver-image.md and drop its Video section - add docs/transform-and-deliver-video.md and examples/transform-and-deliver-video.js covering the player tag, video URL, poster frame, and HLS streaming - split the delivery row in platform-capabilities.md by media type, and update both task indexes and the remaining cross-references URLs verified against the demo cloud: the mp4, poster-frame jpg, and m3u8 manifest all return 200. Co-Authored-By: Claude Opus 5 --- README.md | 3 +- docs/README.md | 3 +- docs/platform-capabilities.md | 5 +- ...edia.md => transform-and-deliver-image.md} | 19 +-- docs/transform-and-deliver-video.md | 109 ++++++++++++++++++ docs/troubleshoot-errors.md | 3 +- docs/upload-image.md | 2 +- docs/upload-large-video.md | 2 + examples/transform-and-deliver-image.js | 3 +- examples/transform-and-deliver-video.js | 74 ++++++++++++ 10 files changed, 202 insertions(+), 21 deletions(-) rename docs/{transform-and-deliver-media.md => transform-and-deliver-image.md} (87%) create mode 100644 docs/transform-and-deliver-video.md create mode 100644 examples/transform-and-deliver-video.js diff --git a/README.md b/README.md index 242f4388..2a24ac73 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,8 @@ Save as `quickstart.js` and run `node quickstart.js`. [Create a free account](ht - [Upload an image](docs/upload-image.md) - [Upload a large video](docs/upload-large-video.md) - [Sign a browser upload](docs/sign-browser-upload.md) -- [Transform and deliver media](docs/transform-and-deliver-media.md) +- [Transform and deliver an image](docs/transform-and-deliver-image.md) +- [Transform and deliver a video](docs/transform-and-deliver-video.md) - [Search and manage assets](docs/search-and-manage-assets.md) - [Moderate an upload](docs/moderate-upload.md) - [Use structured metadata](docs/use-structured-metadata.md) diff --git a/docs/README.md b/docs/README.md index 6aa49a02..a6350236 100644 --- a/docs/README.md +++ b/docs/README.md @@ -29,7 +29,8 @@ failures. Runnable versions of most tasks are in `node_modules/cloudinary/exampl - [Upload an image](upload-image.md) - [Upload a large video](upload-large-video.md) - [Sign a browser upload](sign-browser-upload.md) -- [Transform and deliver media](transform-and-deliver-media.md) +- [Transform and deliver an image](transform-and-deliver-image.md) +- [Transform and deliver a video](transform-and-deliver-video.md) - [Search and manage assets](search-and-manage-assets.md) - [Moderate an upload](moderate-upload.md) - [Use structured metadata](use-structured-metadata.md) diff --git a/docs/platform-capabilities.md b/docs/platform-capabilities.md index c157d5d4..db6dd34d 100644 --- a/docs/platform-capabilities.md +++ b/docs/platform-capabilities.md @@ -79,8 +79,9 @@ Cloudinary publishes agent-readable indexes. Fetch these instead of guessing at | To do this | Use | Where to go | |---|---|---| -| Build a resize, crop, overlay, or format-optimized URL | `url`, `image`, `video` | [Transform and deliver media](transform-and-deliver-media.md) | -| Apply generative edits (gen fill, background removal, ...) | `effect` / `raw_transformation` — **generic strings only, no typed builders** | [Transform and deliver media](transform-and-deliver-media.md) | +| Build a resize, crop, overlay, or format-optimized image URL | `url`, `image` | [Transform and deliver an image](transform-and-deliver-image.md) | +| Build a video URL, player tag, poster frame, or HLS/DASH stream | `url` (with `resource_type: 'video'`), `video` | [Transform and deliver a video](transform-and-deliver-video.md) | +| Apply generative edits (gen fill, background removal, ...) | `effect` / `raw_transformation` — **generic strings only, no typed builders** | [Transform and deliver an image](transform-and-deliver-image.md) | URL building is local: no network call, no `api_secret`. diff --git a/docs/transform-and-deliver-media.md b/docs/transform-and-deliver-image.md similarity index 87% rename from docs/transform-and-deliver-media.md rename to docs/transform-and-deliver-image.md index 62e29c58..2e7d3be0 100644 --- a/docs/transform-and-deliver-media.md +++ b/docs/transform-and-deliver-image.md @@ -1,11 +1,13 @@ -# Transform and deliver media +# Transform and deliver an image ## When to use -Generate CDN-backed delivery URLs that resize, crop, overlay, or optimize images and video. URL +Generate CDN-backed delivery URLs that resize, crop, overlay, or optimize an image. URL generation is local — no network call, no secret required — and the derived asset is created by Cloudinary on first request, then served from CDN cache. +For video, see [Transform and deliver a video](transform-and-deliver-video.md). + ## Optimized image URL ```js @@ -52,18 +54,6 @@ console.log(bannerUrl); Reordering components changes the output. When matching eagerly generated versions, the serialized transformation string must match exactly. -## Video - -```js -// 'examples/uploaded-large-video' is created by the "Upload a large video" task -const clip = cloudinary.video('examples/uploaded-large-video', { - width: 640, - crop: 'scale', - quality: 'auto', - controls: true -}); // returns an HTML