chore(deps): update dependency @nuxt/image to v2 #262
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.11.0->^2.0.0Release Notes
nuxt/image (@nuxt/image)
v2.0.0Compare Source
We're excited to announce Nuxt Image v2! 🎉 This release focuses on TypeScript support, performance improvements, and better developer experience.
👀 Highlights
🎯 TypeScript support
The biggest change in v2 is full TypeScript support throughout the module (#1802).
Typed providers
Image providers now use
defineProviderfor type-safe configuration:Type-safe configuration
Module options are now fully typed. For example, providers that require a
baseURLwill enforce it at the type level in yournuxt.config.ts:Typed composables
The
$imghelper anduseImage()composable have full type inference (#1844):🚀 IPX v3
We've upgraded to IPX v3 (#1799) for better performance and better
sharpbinary handling. The upgrade includes automatic detection of the correctsharpbinaries for your deployment architecture.🔌 Server-side utilities
You can now use image helpers directly in Nitro server endpoints (#1473).
🎨 Component improvements
Template refs
<NuxtImg>now exposes the underlying<img>element via template refs:Typed slots
Both
<NuxtImg>and<NuxtPicture>now have properly typed default slots.🌐 New providers
We've added two new providers:
⚡ Performance
We've made several optimizations to reduce bundle size and improve runtime performance:
URLSearchParamsfor more reliable parameter handling🎯 Better layer support
Nuxt Image now properly supports custom image directories within Nuxt layers (#1880), making it easier to organize images in modular projects.
Provider API
The biggest breaking change is how providers are defined. All providers now use a default export with the
defineProviderwrapper:If you maintain a custom provider, you'll need to update it. But you get full TypeScript support in return!
Removed providers
The deprecated
layer0andedgioproviders have been removed.URL formatters
If you have custom providers using
joinWithfor parameter formatting, you'll need to update them to use theformatterfunction withcreateOperationsGenerator. See the migration guide for details.Removed utilities
We've removed several unused runtime utilities. If you were importing internal utilities directly, check if they still exist.
✅ Upgrading
Check out our comprehensive migration guide for step-by-step upgrade instructions.
The quick version:
Most apps can upgrade with no code changes. If you have custom providers, you'll need to update them to use
defineProvider- see the migration guide for examples.🐛 Bug fixes
This release includes several fixes:
🙏 Thank you
Thank you to all the contributors who made this release possible! This includes contributions from dozens of community members who helped with features, bug fixes, documentation improvements, and feedback.
👉 Changelog
compare changes
🚀 Enhancements
🔥 Performance
🩹 Fixes
💅 Refactors
📖 Documentation
📦 Build
🏡 Chore
✅ Tests
🤖 CI
❤️ Contributors
Configuration
📅 Schedule: Branch creation - "on Monday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.