mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #496] [MERGED] fix: support onLoadingComplete in modern next/image shim #618
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#618
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/496
Author: @NathanDrake2406
Created: 3/12/2026
Status: ✅ Merged
Merged: 3/12/2026
Merged by: @james-elicx
Base:
main← Head:fix/image-onloadingcomplete📝 Commits (2)
0ce7b4bfix: support onLoadingComplete in modern next/image shimd6bbe43fix: correct callback order and add remote URL test📊 Changes
3 files changed (+99 additions, -0 deletions)
View changed files
📝
packages/vinext/src/shims/image.tsx(+19 -0)📝
packages/vinext/src/shims/next-shims.d.ts(+2 -0)📝
tests/image-component.test.ts(+78 -0)📄 Description
Summary
onLoadingCompleteprop to the modernnext/imageshimHTMLImageElement(matching Next.js modern image behavior, not the{ naturalWidth, naturalHeight }form from legacy image)getImagePropsdestructures bothonLoadandonLoadingCompleteso neither leaks into returned propsCloses #15
Test plan
tests/image-component.test.tscovering prop leak prevention viagetImagePropsand SSR output for local + custom loader paths🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.