image icon indicating copy to clipboard operation
image copied to clipboard

fix: use withQuery to build bunny url

Open infabo opened this issue 1 month ago โ€ข 2 comments

In case the image src already contains a query parameter, it is necessary to properly add bunny query params. This is accomplished using withQuery helper from ufo.

๐Ÿ”— Linked issue

resolves #2055

โ“ 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

In case the image src already contains a query parameter, it is necessary to properly add bunny query params. This is accomplished using withQuery helper from ufo.

e.g. url is http://example.com/image.jpg?timestamp

infabo avatar Dec 03 '25 17:12 infabo

Open in StackBlitz

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

commit: f7f0c10

pkg-pr-new[bot] avatar Dec 03 '25 17:12 pkg-pr-new[bot]

Codecov Report

:x: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 6.99%. Comparing base (9fc971d) to head (f7f0c10). :warning: Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
src/runtime/providers/bunny.ts 0.00% 1 Missing and 1 partial :warning:
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2054   +/-   ##
=====================================
  Coverage   6.99%   6.99%           
=====================================
  Files         78      78           
  Lines       3629    3629           
  Branches     140     140           
=====================================
  Hits         254     254           
  Misses      3326    3326           
  Partials      49      49           

: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.

codecov-commenter avatar Dec 12 '25 18:12 codecov-commenter