Skip to content

feat(img): add providerOIptions - #2298

Open
huang-julien wants to merge 1 commit into
mainfrom
feat/provider_options
Open

feat(img): add providerOIptions#2298
huang-julien wants to merge 1 commit into
mainfrom
feat/provider_options

Conversation

@huang-julien

Copy link
Copy Markdown
Member

🔗 Linked issue

fix #1176

📚 Description

This PR adds providerOptions to the props list to allow for per component instance configuration.

image

@huang-julien
huang-julien requested a review from danielroe as a code owner August 1, 2026 20:38
@pkg-pr-new

pkg-pr-new Bot commented Aug 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: b547ac1

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b610628e-5adb-4947-8496-bfcdfd47e7a8

📥 Commits

Reviewing files that changed from the base of the PR and between f09eef6 and b547ac1.

📒 Files selected for processing (6)
  • docs/content/2.usage/1.nuxt-img.md
  • docs/content/2.usage/3.use-image.md
  • src/runtime/image.ts
  • src/runtime/utils/props.ts
  • src/types/image.ts
  • test/nuxt/use-image.test.ts

📝 Walkthrough

Walkthrough

The change adds provider-specific options to image types and runtime APIs. providerOptions can override configured provider values for individual images or calls. Runtime option merging now preserves provider-aware typing. Documentation includes Cloudinary examples and getSizes behavior. Tests cover IPX URL overrides and invalid provider options.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies provider options as the main change despite a minor spelling error.
Description check ✅ Passed The description explains that providerOptions enables per-component provider configuration, which matches the changeset.
Linked Issues check ✅ Passed The changes implement provider-specific per-instance configuration for NuxtImg and related image APIs, including baseURL overrides requested in issue #1176.
Out of Scope Changes check ✅ Passed The documentation, typings, runtime updates, and tests all support providerOptions and its per-instance provider configuration behavior.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/provider_options

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

provide the ability to send the provider's config to NuxtImg

1 participant