mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
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#1015
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/1004
Author: @Divkix
Created: 5/1/2026
Status: ✅ Merged
Merged: 5/2/2026
Merged by: @james-elicx
Base:
main← Head:fix/990-next-image-onerror-once📝 Commits (3)
edeecb0fix: next/image only fire onError and onLoad once per src per mount (#990)035e0bdfix: add "use client" directive to next/image shimbf852d6fix: move resolveImageSource above handler closures for readability📊 Changes
2 files changed (+167 additions, -8 deletions)
View changed files
📝
packages/vinext/src/shims/image.tsx(+38 -8)📝
tests/image-component.test.ts(+129 -0)📄 Description
Fixes #990
Summary
useRef-based dedup to preventonLoadandonErrorfrom firing multiple times for the same imagesrcacross React re-rendersonErrorfrom props (previously fell through{...rest}to native<img>, bypassing any dedup)onErrorto all 4 render paths — was silently dropped on UnpicImage paths (remote URLs)Ported from upstream Next.js fix in vercel/next.js#93209.
Test plan
image-component.test.tstests pass including 7 new SSR dedup tests🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.