Skip to content

fix(stabilization): fix loadImageSrcset plugin#264

Merged
gregberge merged 1 commit intomainfrom
improve-load-image-srcset-plugin
Jan 13, 2026
Merged

fix(stabilization): fix loadImageSrcset plugin#264
gregberge merged 1 commit intomainfrom
improve-load-image-srcset-plugin

Conversation

@gregberge
Copy link
Member

No description provided.

@gregberge gregberge requested review from a team, Copilot and jsfez and removed request for a team January 13, 2026 20:01
@vercel
Copy link

vercel bot commented Jan 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
argos-js-sdk-reference Ready Ready Preview, Comment Jan 13, 2026 8:44pm

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the loadImageSrcset plugin by replacing a flawed "largest image selection" approach with a proper "force browser re-evaluation" strategy. The previous implementation attempted to manually parse srcset and always select the largest image, which didn't respect viewport sizes. The new implementation preserves the original srcset/sizes attributes and forces the browser to re-evaluate image selection on viewport changes by temporarily clearing and restoring these attributes.

Changes:

  • Replaced srcset parsing logic with a re-evaluation approach that clears and restores srcset/sizes attributes
  • Added storage of original srcset/sizes values in dataset attributes to preserve them across viewport changes
  • Removed manual srcset parsing that selected the largest image regardless of viewport

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Fix handling of srcset with density
- Fix image loading waiting
- Fix round size backup
@gregberge gregberge force-pushed the improve-load-image-srcset-plugin branch from f10807c to a596275 Compare January 13, 2026 20:43
@gregberge gregberge merged commit af15ab0 into main Jan 13, 2026
65 checks passed
@gregberge gregberge deleted the improve-load-image-srcset-plugin branch January 13, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants