Skip to content

Add progressive_blur support - #88

Merged
11bit merged 1 commit into
mainfrom
add-progressive-blur
Aug 21, 2026
Merged

Add progressive_blur support#88
11bit merged 1 commit into
mainfrom
add-progressive-blur

Conversation

@11bit

@11bit 11bit commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Closes #83

Aligns the library with the imgproxy docs update, which added one new URL option (imgproxy Pro):

progressive_blur:%sigma:%direction:%start:%stop
pbl:%sigma:%direction:%start:%stop

When sigma is greater than 0, imgproxy applies a progressive Gaussian blur that transitions from no blur at the start position to the specified sigma at the stop position.

  • sigma — size of the mask used for the maximum blur; 0 disables the effect
  • direction(optional) down (default), up, right, left, or an angle in degrees
  • start, stop(optional) floats between 0 and 1, defaulting to 0.0 and 1.0

Scope

progressive_blur is documented only as a processing option — it does not appear under ## Info options in the image-info docs — so it lives in src/options/ + src/types/ and is deliberately not wired into generateImageInfoUrl.

Implementation notes

  • Modeled on gradient, which shares the exact direction/start/stop semantics: same correctDirection value set, same trailing-: trimming of omitted optional args.
  • One deliberate deviation from gradient: optional args are validated and rendered with !== undefined / ?? rather than truthiness. In gradient, start: 0 silently skips validation and renders as empty; here start: 0 validates and renders explicitly (pbl:10::0:0.85). Positionally both forms are equivalent to imgproxy, but the explicit form is what the caller asked for. Happy to switch to strict gradient parity if you'd rather keep the two identical.
  • Marked **PRO feature** in the typedocs on both the value interface and the *OptionsPartial interface.

Not included

The rest of the docs diff is server configuration with no representation in this package: IMGPROXY_MAX_ML_CONCURRENCY (new Machine learning section) and IMGPROXY_S3_ACCESS_POINTS plus the S3 access points guide.

Verification

  • tsc --noEmit clean, eslint src tests clean
  • vitest run → 98 files / 1117 tests passing (22 new)
  • End-to-end spot check: generateUrl(..., { width: 10, progressive_blur: { sigma: 10, direction: "right", start: 0.2, stop: 0.8 } })/pbl:10:right:0.2:0.8/w:10/plain/img; { pbl: { sigma: 5 } }/pbl:5/plain/img

Relation to other open PRs

Independent — branched from main, touches different files than #85 (bypass_cache/cache_tags) and #86 (video_thumbnail_keyframes), apart from src/options/index.ts and src/types/index.ts, where insertions are in different regions.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G8Aa3xeVUCaxKtQJDzZhMo

Adds the `progressive_blur` (`pbl`) option. It is documented as a
processing option only, so it is not exposed for image info URLs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G8Aa3xeVUCaxKtQJDzZhMo
@11bit
11bit merged commit 183d037 into main Aug 21, 2026
1 check passed
@11bit
11bit deleted the add-progressive-blur branch August 21, 2026 07:38
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.

Usage docs of imgproxy have been updated

1 participant