vercel blob put-image stores optimized image output
Introduced 2026-08-12 · score 0.97
HOW TO USE IT
When you need to store a transformed local image or public HTTP(S) image URL in Vercel Blob, run `vercel blob put-image` with `--width` and `--pathname`. The command stores the optimized output and prints its URL; use `--json` for the full blob object.
vercel blob put-image <file-or-url> --pathname <pathname> --width <width> --access <public|private>vercel blob put-image <file-or-url> --pathname <pathname> --width <width> --quality <1-100> --format <jpeg|png|webp|avif> --access <public|private> --jsonWHY THIS HELPS
When storing a locally available image or a public image URL in Vercel Blob, create a transformed image at the required pathname.
REQUIREMENTS AND LIMITATIONS
- Version: 58.10.0
- <file-or-url> (required): Local image path or public HTTP(S) URL to optimize.
- --width <width> (required): Output width in pixels (1–8192); preserves aspect ratio.
- --pathname <pathname> (required): Pathname where the optimized output is stored.
- --quality <1-100>: Optimized image quality; defaults to 75.
- --format <jpeg|png|webp|avif>: Output format; omitted preserves the source format.
- --access <public|private> (required): Select the blob's storage access mode.
- --json: Print full blob object, including URL, download URL, pathname and content type.
- --oidc-token and --store-id: Provide OIDC credentials; alternatively set VERCEL_OIDC_TOKEN and BLOB_STORE_ID. Read-write tokens are not accepted.
- Prerequisite: Requires OIDC credentials: pass --oidc-token and --store-id, or set VERCEL_OIDC_TOKEN and BLOB_STORE_ID. A linked project with a connected Blob store populates these automatically; `vercel env pull` can make them available in `.env.local`.
- Source must be a local file or public http(s) URL.
- `--width` and `--pathname` are required; `--quality` defaults to 75.
- Supported formats are jpeg, png, webp and avif; when `--format` is omitted, the original is preserved.
- Requires OIDC credentials using either the stated flag pair or environment variable pair.
- Stored content type comes from the optimizer output; there is no `--content-type` flag.
- Uses the `putImage` method from `@vercel/blob` 2.8.0.
- The command warns when the optimizer keeps the original image because optimized output would have been larger.
- Docs conflict: Current Vercel CLI docs say `--access` is required for `put-image`, but the supplied release note does not mention this flag; the documented runnable command includes it.
- Docs conflict: The current docs describe output format preservation as preserving the source image format, while the release note says the original is preserved when `--format` is omitted. They appear consistent; no conflict recorded.
FIRST-PARTY EVIDENCE
- https://github.com/vercel/vercel/blob/main/packages/cli/CHANGELOG.md#58100
- https://vercel.com/docs/cli/blob
Check the installed version and the source before using it. Entry JSON