npm / @vercel/blob
@vercel/blob
What changed in @vercel/blob 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
9 breaking1 security3 deprecations18 new APIs and options3 behavior and defaults6 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@vercel/blob 234 changes
Breaking changes 4
Image optimization through
putorputFromUrlrequires OIDC authentication.A blank request-context header now resolves to no token rather than falling back to VERCEL_OIDC_TOKEN.
When ifMatch is set through onBeforeGenerateToken or direct token generation, allowOverwrite is implicitly enabled; explicitly setting allowOverwrite to false throws a clear error.
Client Uploads no longer infer callbackUrl from the browser’s location. When not hosted on Vercel, provide it in the object returned by onBeforeGenerateToken; on Vercel it is inferred from system environment variables.
Security 1
Validates the URL domain in get() to prevent sending the token to arbitrary hosts.
Deprecations 3
The optimizeImage option on put is deprecated in favor of putImage, but continues to work.
The putFromUrl function is deprecated in favor of putImage, but continues to work.
The useCache option is still accepted but ignored; reads always use the standard caching path. It will be removed in a future major version.
New APIs and options 17
Add setTtl(urlOrPathname, { ttlDays }) to change or clear a blob's TTL, including batch updates of up to 1,000 URLs; failed updates return error entries.
Add ttlDays to put, putImage, putFromUrl, copy, rename, createMultipartUpload, client tokens, and presigned URLs. TTLs range from 1 to 730 days and incur an additional Advanced Operation per started 60 days.
Adds an API that optimizes image content or a public image URL and stores only the optimized output. Its options mirror put plus required width, quality, and format parameters.
The put option optimizes an image through Vercel Image Optimization before storing it; only the optimized output is stored.
Adds a method that optimizes an image through Vercel Image Optimization before storing it; only the optimized output is stored.
Adds useCache for get operations; setting it to false adds cache=0 to bypass the CDN cache for private blobs and read the latest content from origin storage.
Adds an API to move a blob to another pathname by copying it and then deleting the source. Overwriting is disabled by default; the API requires a read-write token.
Adds presigned URLs.
Adds Vercel OIDC authentication.
Fetch blob content by URL or pathname; returns a ReadableStream and blob metadata.
Pass a previously received ETag to
get(); if the blob has not changed, it returnsstatusCode: 304withstream: null, avoiding an unnecessary re-download.Blobs can be uploaded and read privately by setting
access: 'private'onput()andget(); private blobs require authentication and are not publicly accessible via their URL.Adds the ifMatch option for conditional deletes using optimistic concurrency control; it works only for single-URL deletes.
Adds an error for ETag mismatches when a conditional write fails with HTTP 412.
Blob responses from put, copy, head, list, and multipart now return an etag, which can be used for conditional writes.
Accepts an
ifMatchoption to perform a conditional write only if the blob's current ETag matches the supplied value.Set this environment variable to your tunnel URL for local development so Client Uploads can reach the callback.
Behavior and default changes 3
put, putImage, copy, rename, and completeMultipartUpload return expiresAt for blobs written with ttlDays; head() also returns the scheduled expiresAt.
get() now accepts blob URLs from the same origin as VERCEL_BLOB_API_URL or NEXT_PUBLIC_VERCEL_BLOB_API_URL when either is set; without an override, arbitrary hosts remain rejected.
The package now uses the refreshing OIDC token getter, refreshing expired tokens in development; if refresh fails, callers fall back to BLOB_READ_WRITE_TOKEN.
Fixes and other changes 6
Blob pathnames containing
.or..segments are read as written, fixinghead,copy,rename,delandlistfor those blobs.Restores the
useCacheoption. Setting it to false bypasses the CDN cache and serves the blob from origin storage; it defaults to true.The transform stream no longer bypasses backpressure due to incorrect queueMicrotask wrapping.
Multipart uploads no longer hang forever on empty streams.
Known-size Blob, File, and Buffer bodies are checked client-side before multipart uploads start, avoiding wasted API calls.
On put(), ifMatch now implicitly enables allowOverwrite, avoiding conflicting conditional headers to S3; explicitly setting allowOverwrite to false with ifMatch throws a clear error.
@vercel/blob 16 changes
Breaking changes 5
addRandomSuffix is now false by default; set it to true in put and onBeforeGenerateToken options if you rely on random suffixes.
Set allowOverwrite: true in put and onBeforeGenerateToken options to overwrite blobs; overwriting without it throws.
Blob cache duration cannot be configured to less than one minute.
Random suffixes are now also added to the content-disposition header.
Random suffixes are now added to the pathname of blob responses, so UIs displaying it may need to accommodate longer values.
New APIs and options 1
Blobs are cached for one month by default, and the cache duration is configurable.