image
image copied to clipboard
feat: add support for image helpers in nitro endpoints
Implement image helper utilities usage in nitro endpoints, by adding image options and nitro compatible utils in server directory. But to be honest, it's my first contribution and i might (probably am) mess with a wrong config, so, it will be so kind for anyone to point out if i have done anything wrong!
๐ Linked issue
resolves #1447
โ Type of change
- [ ] ๐ Documentation (updates to the documentation or readme)
- [ ] ๐ Bug fix (a non-breaking change that fixes an issue)
- [x] ๐ 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
Add an utility on server folder and auto import it into nitro, and also write image options into a virtual path in nitro. Set a boolean to check if the utility is used in nitro environment, if it is, ignore prerendering static images.
Codecov Report
Attention: Patch coverage is 53.48837% with 20 lines in your changes missing coverage. Please review.
Project coverage is 62.93%. Comparing base (
a12c220) to head (2b938b4). Report is 67 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1473 +/- ##
==========================================
- Coverage 63.01% 62.93% -0.08%
==========================================
Files 80 81 +1
Lines 3742 3772 +30
Branches 426 429 +3
==========================================
+ Hits 2358 2374 +16
- Misses 1356 1369 +13
- Partials 28 29 +1
: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.