Skip to content

fix: treat an empty TransformOptions as no transform, not a render request - #55

Merged
Tr00d merged 2 commits into
masterfrom
fix-transformoptions
Aug 4, 2026
Merged

fix: treat an empty TransformOptions as no transform, not a render request#55
Tr00d merged 2 commits into
masterfrom
fix-transformoptions

Conversation

@Tr00d

@Tr00d Tr00d commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #37

Tr00d added 2 commits August 4, 2026 10:07
…quest

GetPublicUrl, Download and CreateSignedUrl selected the image-render
endpoint whenever transform options were non-null. But TransformOptions
ships non-null defaults (Resize=Cover, Quality=80, Format=origin), so a
fresh `new TransformOptions()` is never empty and always emits
resize/quality — routing "no transform" calls to
`/render/image/...?format=origin&resize=cover&quality=80`. That URL is
broken locally (imgproxy off) and silently transforms in production.

Add TransformOptions.IsEmpty (every field still at its constructed
default) and select the render endpoint only when a transform is
actually requested, mirroring the storage-js `wantsTransformation`
guard. Also skips the transform query on the download paths so an empty
options object never dangles resize/quality onto an object URL.

Fixes #37
@Tr00d
Tr00d merged commit 9ae3581 into master Aug 4, 2026
1 check passed
@Tr00d
Tr00d deleted the fix-transformoptions branch August 4, 2026 08:17
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.

GetPublicUrl with an empty TransformOptions routes to the render endpoint instead of the object URL

1 participant