Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

amrelbialy
Copy link
Contributor

@amrelbialy amrelbialy commented Oct 14, 2025

πŸ”— Linked issue

resolves #1683

❓ Fix

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description
Resolved an issue where images could load more than once in the NuxtImg component. Previously, when a placeholder image was in use, it triggered a new image load even though the main image had already started loading. The update ensures that if a placeholder is already handled, we avoid loading the image again. This change prevents duplicate network requests and avoids unnecessary load events. By removing the preload using new image() instance and adding onLoad to imgAttrs, and using vue reactive to handle the update when placeholderLoaded is true

@amrelbialy amrelbialy requested a review from danielroe as a code owner October 14, 2025 15:43
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 14, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/image@1984

commit: 8eab55b

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.

Double image loaded with placeholder

1 participant