Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move src attribute to end of <img> tag to fix lazy loading (#1317) #1338

Merged
merged 2 commits into from Apr 23, 2024

Conversation

Ragura
Copy link
Contributor

@Ragura Ragura commented Apr 23, 2024

As described in this Vue core issue (vuejs/core#10764), using the src attribute before loading results in the lazy-loading being inconsistent across loads. This PR moves the src tag to the last position in the element.

I tested the behavior before and after the change in the playground to confirm it is working correctly. If you want I can also commit the playground page for reference.

Feel free to correct me on anything I might have done wrong, be it in the code or while making this PR. I'm not very experienced with the process of contributing to public repos yet!

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

Perfect! 👌

@danielroe danielroe merged commit 55dd189 into nuxt:main Apr 23, 2024
1 check passed
@github-actions github-actions bot mentioned this pull request Apr 23, 2024
@github-actions github-actions bot mentioned this pull request May 2, 2024
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.

None yet

2 participants