Page MenuHomePhabricator

Document project picture dimension constraints
Closed, ResolvedPublic

Description

Upstream: https://we.phorge.it/T15984

In the project https://phabricator.wikimedia.org/project/manage/7584/ the image was initially showing as the "mystery ghost" only when the image was made 400×400 was it able to upload.

Are there project picture criteria we need to document on the upload dialog? Anything recently deployed explain this?

Event Timeline

I'd love to know the pixel dimensions of the original custom image.

If I understand correctly, a custom image was uploaded as project profile image, but not rendered correctly and the mystery ghost got rendered instead.

Are there project picture criteria

I'd assume that the 1 ∶ <4 ratio also applies here, per T290959#9791029.

we need to document on the upload dialog?

Maybe we could expand the ->setCaption($supported_formats_message) in src/applications/project/controller/PhabricatorProjectEditPictureController.php, preferably in upstream:

Screenshot From 2025-01-06 21-20-17.png (441×730 px, 40 KB)

Original image dimensions were 4672 × 5941, 3.8 MB (https://phabricator.wikimedia.org/F58028490). I then trimmed it down to be more square, resulting in 4667x4763, 4.3 MB (https://phabricator.wikimedia.org/F58028494). Both of those successfully uploaded, but displayed the mystery ghost.

The final image that worked was 400x400, 91 KB (https://phabricator.wikimedia.org/F58134690).

It seems like the dimensions of the first images were within the ratio -- was the file size too big, even though it allowed the upload?

Original image dimensions were 4672 × 5941, 3.8 MB (https://phabricator.wikimedia.org/F58028490). I then trimmed it down to be more square, resulting in 4667x4763, 4.3 MB (https://phabricator.wikimedia.org/F58028494). Both of those successfully uploaded, but displayed the mystery ghost.

The final image that worked was 400x400, 91 KB (https://phabricator.wikimedia.org/F58134690).

It seems like the dimensions of the first images were within the ratio -- was the file size too big, even though it allowed the upload?

oh! There used to be a 2 MB file size limit here, maybe that's what we're running into (rather than a dimension thing). I wonder if that's available in the EditPictureController(?)

I can reproduce locally, it's definitely the dimensions.
It is not conflicting with Phab's storage.mysql-engine.max-size setting (which, uhm, differs between production and GitLab) and it's not related to file size and it's not strictly related to 1:1 dimensions ratio. 4000px × 4000px works. 5000px × 5000px does not work. 4000px × 5000px doesn't work.
Let's see if I'll manage to locate some related code somewhere...

Aklapper renamed this task from Document project picture size constraints to Document project picture dimension constraints.Jan 6 2025, 9:06 PM
Aklapper triaged this task as Low priority.
Aklapper edited projects, added Phabricator (Upstream); removed Phabricator.
Aklapper updated the task description. (Show Details)
Aklapper moved this task from Backlog to Upstreamed on the Phabricator (Upstream) board.
Aklapper added a project: Upstream.
Aklapper moved this task from Backlog to Patch proposed upstream on the Upstream board.
Aklapper changed the task status from Open to Stalled.Feb 3 2025, 10:53 AM
Aklapper moved this task from Upstreamed to Solved upstream on the Phabricator (Upstream) board.
Aklapper moved this task from Patch proposed upstream to Patch merged upstream on the Upstream board.

This issue should now be fixed on phabricator.wikimedia.org after today's software deployment in T404134.