[GH-ISSUE #386] Align next/image API surface with Next.js 16.0.0 #87

Closed
opened 2026-05-06 12:37:07 +02:00 by BreizhHardware · 1 comment

Originally created by @Divkix on GitHub (Mar 9, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/386

Problem

vinext's next/image shim has several gaps compared to the Next.js 16.0.0 public API:

  • Missing blurWidth/blurHeight on StaticImageData
  • imageSizes default includes 16 (removed in Next.js 16)
  • contentDispositionType defaults to "inline" instead of "attachment" (XSS vector)
  • No preload prop (Next.js 16 replacement for deprecated priority)
  • No images.qualities config support
  • No AVIF quality offset
  • Deprecated props (onLoadingComplete, layout, objectFit, etc.) cause type errors instead of being silently accepted
  • PlaceholderValue type doesn't accept data:image/ URLs
  • width/height types don't accept string numbers
  • Missing type exports: StaticRequire, StaticImport, ImageLoaderProps, ImageProps

Expected behavior

Any library or app code written against Next.js 16's next/image API should work on vinext without modification.

Fix

PR #385

Originally created by @Divkix on GitHub (Mar 9, 2026). Original GitHub issue: https://github.com/cloudflare/vinext/issues/386 ## Problem vinext's `next/image` shim has several gaps compared to the Next.js 16.0.0 public API: - Missing `blurWidth`/`blurHeight` on `StaticImageData` - `imageSizes` default includes `16` (removed in Next.js 16) - `contentDispositionType` defaults to `"inline"` instead of `"attachment"` (XSS vector) - No `preload` prop (Next.js 16 replacement for deprecated `priority`) - No `images.qualities` config support - No AVIF quality offset - Deprecated props (`onLoadingComplete`, `layout`, `objectFit`, etc.) cause type errors instead of being silently accepted - `PlaceholderValue` type doesn't accept `data:image/` URLs - `width`/`height` types don't accept string numbers - Missing type exports: `StaticRequire`, `StaticImport`, `ImageLoaderProps`, `ImageProps` ## Expected behavior Any library or app code written against Next.js 16's `next/image` API should work on vinext without modification. ## Fix PR #385
Author
Owner

@Divkix commented on GitHub (Mar 10, 2026):

Deferring this work — PR #385 is being closed. Will be revisited in a future PR.

<!-- gh-comment-id:4029398012 --> @Divkix commented on GitHub (Mar 10, 2026): Deferring this work — PR #385 is being closed. Will be revisited in a future PR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#87
No description provided.