Skip to content

feat(imgproxy): add imgproxy runtime srcset builder - #13

Merged
dangreen merged 1 commit into
mainfrom
add-imgproxy
Aug 8, 2026
Merged

feat(imgproxy): add imgproxy runtime srcset builder#13
dangreen merged 1 commit into
mainfrom
add-imgproxy

Conversation

@dangreen

@dangreen dangreen commented Aug 8, 2026

Copy link
Copy Markdown
Member

Adds @srcset/imgproxy - runtime srcset builder for imgproxy urls.

  • Imgproxy - isomorphic builder of loader-shaped srcset objects (url, src, srcSet, srcMap) for content images, e.g. from an API or a CMS; absolute integer widths, format defaults to the url path extension
  • Source urls are always utf-8 base64url-encoded (the plain form needs escaping of query strings, percent and at signs, and non-ascii)
  • imgproxy presets supported via the processing hook
  • @srcset/imgproxy/sign - separate server-only entry with an HMAC-SHA256 url path signer (for BFF/RSC), rejects hex key/salt that Buffer.from would silently truncate
  • No bundler backend by design: serving emitted originals in dev mode is not viable, so urls are built at runtime instead
  • Reviewed locally with Codex: consolidated findings addressed (source url encoding, width validation, format inference, hex validation)

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78fbe94fb5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/imgproxy/vite.config.js Outdated
Comment thread packages/imgproxy/src/image.ts Outdated
Comment thread packages/imgproxy/src/image.ts
@dangreen
dangreen force-pushed the add-imgproxy branch 3 times, most recently from 719ece0 to 4989baf Compare August 8, 2026 09:48
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 31254345354

Coverage increased (+0.6%) to 91.312%

Details

  • Coverage increased (+0.6%) from the base build.
  • Patch coverage: 58 of 58 lines across 4 files are fully covered (100%).
  • 2 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

2 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
packages/loader/src/template.ts 2 90.48%

Coverage Stats

Coverage Status
Relevant Lines: 663
Covered Lines: 619
Line Coverage: 93.36%
Relevant Branches: 488
Covered Branches: 432
Branch Coverage: 88.52%
Branches in Coverage %: Yes
Coverage Strength: 78713.64 hits per line

💛 - Coveralls

@dangreen
dangreen merged commit 5b93f0c into main Aug 8, 2026
7 checks passed
@dangreen
dangreen deleted the add-imgproxy branch August 8, 2026 11:11
@github-actions github-actions Bot mentioned this pull request Aug 7, 2026
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