Local image transformations fail for filenames containing @

Open
#1,641 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@hsusul is already working on this.

Since Nov 1, 2026.

  • #1642 by @hsusul — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, typescript
Domain
backend

Research direction

Start in ImageRenderer.getAsset(), where local:// URLs skip the encoding applied to remote sources, and compare with the URL FileBackend.privateAssetUrl() returns. Check the imgproxy plain-URL parsing the issue links (options/url.go, v3.26.0) to see why an unescaped @ is read as a format separator. Reproduce by uploading [email protected] through the file backend and requesting a transformation. Done when that request returns HTTP 200 and the cat.png control still renders.

Written by the indexing model from the issue text.

Description

Bug report

Self-hosted Storage using the file backend cannot transform images with @ in their names, such as [email protected]. This character is accepted by Storage's object-key validation.

FileBackend.privateAssetUrl() returns a raw local:///... source URL. ImageRenderer.getAsset() exempts these local URLs from the encoding applied to remote source URLs. In imgproxy's plain URL syntax, an unescaped @ separates the source URL from the output format. The filename is therefore parsed as a format option.

Reproduction

At Storage master 9d15cdc93c0b1afc37708914f5e45f865b231d48, use the file backend with the bundled darthsim/imgproxy:v3.26.0, upload a PNG as [email protected], then request an image transformation.

A focused reproduction invoking the actual ImageRenderer.getAsset() against that imgproxy image fails with Invalid image request. Imgproxy logs Invalid image format: 2x.png. As a control, the same PNG named cat.png renders successfully. Sending the source URL through encodeURIComponent() also makes the @2x image render successfully (HTTP 200, image/png).

Expected behavior is successful rendering for the accepted filename.

The parser splits on @ before percent decoding: https://github.com/imgproxy/imgproxy/blob/v3.26.0/options/url.go#L50-L72

Scope

The reproduction concerns the local file backend. Remote source URLs already receive the required outer encoding. Filenames containing ? have a separate imgproxy limitation and are outside this report.

Discovered with AI-assisted code inspection and confirmed with a local runtime reproduction.

Dominant language
TypeScript
Stars
1.3k
Forks
318
Avg merge
1d 15h
Merged PRs (30d)
104

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/storage

All issues in supabase/storage

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.