feat(imagor): add imagor provider#196
Open
xsynaptic wants to merge 1 commit into
Open
Conversation
🦋 Changeset detectedLatest commit: a52e965 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 |
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 a provider for imagor, a self-hosted, thumbor-derived image processing server written in Go, wrapping libvips, and trivially hosted via Docker image. Addresses #37 (the thumbor/self-hosted request).
imagor uses a positional URL grammar (typed path segments with a trailing
filters:map), so this follows the storyblok provider's shape rather thancreateOperationsHandlers.Design notes
data/entry; it's selected withprovider: "imagor", much likedirectus.generateemits imagor'sunsafeform by default. imagor refuses unsigned requests unless the server runs withIMAGOR_UNSAFE, and a secret-less provider can't produce the HMAC signature. Theunsafeform is the only complete URL it can emit, so it's the default. As withipx, signing is left to the operator. Consumers can pass{ unsafe: false }to get the bare signable path for their own signing layer.ipxit can't run as a Netlify function in the playground, and there's no public instance. The example URL is included for completeness but skipped in E2E, matchingsupabaseandimageengine.Known limitations
extractstrips theunsafesentinel but not the HMAC signature segment, so re-transforming a signed URL isn't supported (a secret-less provider can't re-sign anyway).meta/, base64 source decoding, and adaptive fit variants aren't modeled;adaptive-*fit tokens are parsed but normalize to their non-adaptive form.cover, default format is handled server-side rather than in the URL, and upscale protection isn't expressible at the URL level in cover mode, so it's omitted.