Repository navigation
Conversation
Adds extract, generate and transform for Dynjandi image URLs (https://cdn.dynjandi.dev). Supports resize, crop, format and quality, and drops anything the service would reject. Wire-up follows separately.
🦋 Changeset detectedLatest commit: 1ac8d20 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
baldurpan
marked this pull request as draft
October 4, 2026 22:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Dynjandi as an image CDN provider.
URL shape
Dynjandi serves an uploaded image at
/<id>and a variant at/<id>/followed by a chain of-/<operation>/<arguments>/segments, applied in order:The grammar is specified in the project's OpenAPI spec (the "Variant URL grammar" section).
Operations
widthandheightmap toresize/<w>x<h>/, either side optional. With both, the service scales to cover and centre-crops, which is the default fit unpic asks for.formatmaps toformat/<f>/forjpeg,png,webpandavif.jpgis sent asjpeg.qualitymaps toquality/<q>/: an integer from 1 to 100, or one of the service's named levels (lightest,lighter,normal,smart,better,best).cropis provider-specific and carries the grammar's<w>x<h>/<position>text (compass,attention,entropy, face chains, orfocal/<x>x<y>).scale_cropis read ascrop.extractreads crops back, sotransformof an already-cropped URL keeps the crop.The service answers any operation it doesn't support with a 400, so anything without a Dynjandi equivalent is dropped, never sent. That includes out-of-range or non-integer sizes, unsupported formats and unknown quality values.
Defaults and caveats
Accept, andformat/autois a 400, so when no format is given the original format is served.CONTRIBUTING.md. It is documented in the provider's header comment.Detection
cdn.dynjandi.devis added todata/domains.json. Custom domains aren't detected and needprovider: "dynjandi".Checks
deno check src/is clean, anddeno test -A src/passes (88 tests, 314 steps).deno fmt --checkis clean on every touched file exceptdeno.jsonc, which already lacks a final newline onmain.deno publish --dry-runpasses.e2e.test.ts: both Dynjandi steps pass against production with the demo image, a CC0 photo of the Dynjandi waterfall. Six other steps (Cloudflare ×2, IPX ×2, Next.js, Vercel) fail the same way on the base commit without this change.generatewere parsed with the service's own grammar package (@dynjandi/transform-grammar). They cover a matrix of every operation, alone and combined, at boundary values. URLs built by the Dynjandi SDK extract back to the same width, height, format, quality and crop.@unpic/corewith this provider loads at every width (640w to 1600w).