Skip to content

feat(providers): add cloudflareimages provider#2100

Open
huang-julien wants to merge 4 commits intomainfrom
feat/cloudflareimages
Open

feat(providers): add cloudflareimages provider#2100
huang-julien wants to merge 4 commits intomainfrom
feat/cloudflareimages

Conversation

@huang-julien
Copy link
Member

@huang-julien huang-julien commented Jan 31, 2026

🔗 Linked issue

❓ Type of change

  • 📖 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

This PR adds Cloudflare Image provider, its a bit different from the main Cloudflare provider which is the cloudflare transformation service.

This adds a variant modifier but still allows CLoudflare transformation url params (users needs to enable flexible variant)

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 31, 2026

Open in StackBlitz

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

commit: e058ead

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 31, 2026

Deploying nuxt-image with  Cloudflare Pages  Cloudflare Pages

Latest commit: e058ead
Status: ✅  Deploy successful!
Preview URL: https://1957552f.nuxt-image.pages.dev
Branch Preview URL: https://feat-cloudflareimages.nuxt-image.pages.dev

View logs

@coderabbitai
Copy link

coderabbitai bot commented Jan 31, 2026

Warning

Rate limit exceeded

@huang-julien has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 45 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

Adds Cloudflare Images as a built-in provider. Updates BuiltInProviders in src/provider.ts to include cloudflareimages, and adds a new provider module src/runtime/providers/cloudflareimages.ts exporting CloudflareImagesModifiers, CloudflareImagesOptions, and a default provider implementing getImage that builds Cloudflare Images URLs (default baseURL https://imagedelivery.net/ and default variant public), using an operations string when modifiers are present. Adds related tests, a snapshot, and test data updates for the new provider.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a new Cloudflare Images provider.
Description check ✅ Passed The description is directly related to the changeset, explaining what Cloudflare Images provider is, how it differs from the existing Cloudflare provider, and its key features.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/cloudflareimages

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 and usage tips.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 1.75439% with 56 lines in your changes missing coverage. Please review.
✅ Project coverage is 6.91%. Comparing base (ac802b3) to head (e058ead).

Files with missing lines Patch % Lines
src/runtime/providers/cloudflareimages.ts 1.78% 55 Missing ⚠️
src/provider.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #2100      +/-   ##
========================================
- Coverage   6.99%   6.91%   -0.09%     
========================================
  Files         78      79       +1     
  Lines       3632    3689      +57     
  Branches     140     141       +1     
========================================
+ Hits         254     255       +1     
- Misses      3329    3385      +56     
  Partials      49      49              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants