image
image copied to clipboard
fix: incorrect preload link for multiple densities
NuxtImg did not add correct preload links for images that had multiple densities but only one size which caused the preload tag to load 1x images for devices with 2x pixel ratio. That is now fixed.
๐ Linked issue
Resolves #1850
โ Type of change
- [ ] ๐ Documentation (updates to the documentation or readme)
- [x] ๐ 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
Do not require both sizes and densities to be set to generate imagesrcset. Take each of them into account.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 7.09%. Comparing base (96ec681) to head (4aa2807).
Additional details and impacted files
@@ Coverage Diff @@
## main #1851 +/- ##
=====================================
Coverage 7.08% 7.09%
=====================================
Files 76 76
Lines 3527 3525 -2
Branches 137 137
=====================================
Hits 250 250
+ Misses 3230 3228 -2
Partials 47 47
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@raggesilver is attempting to deploy a commit to the NuxtLabs Team on Vercel.
A member of the Team first needs to authorize it.
Can we get this simple merge request merged? I can confirm this change applies the needed fix.
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
| Project | Deployment | Preview | Updated (UTC) |
|---|---|---|---|
| image-docus | Aug 19, 2025 3:53pm |