Skip to content

Use Imagick methods instead of mogrify() for repo theme images#2375

Open
sbreker wants to merge 3 commits into
qa/2.xfrom
dev/repo-logo-use-imagick
Open

Use Imagick methods instead of mogrify() for repo theme images#2375
sbreker wants to merge 3 commits into
qa/2.xfrom
dev/repo-logo-use-imagick

Conversation

@sbreker

@sbreker sbreker commented Jun 27, 2026

Copy link
Copy Markdown
Member

Refactored class arRepositoryThemeCropValidatedFile to use Imagick methods instead of mogrify command.

Replace the previous crop-only behavior with resize-and-crop processing for repository logo and banner uploads. Images are now scaled to cover the target dimensions while preserving aspect ratio, then center-cropped to the final logo or banner size. This keeps uploaded assets small after processing and avoids squashing non-square source images. Also increased the allowed upload size from 256K to 500K to give users more room to upload larger source images before resize and crop.

Set Imagick memory, map, and pixel-area limits before reading repository logo and banner uploads.

@sbreker sbreker force-pushed the dev/repo-logo-use-imagick branch from 797cee4 to 5eef0f0 Compare June 27, 2026 01:02
Refactored class arRepositoryThemeCropValidatedFile to use Imagick
methods instead of mogrify() command.
@sbreker sbreker force-pushed the dev/repo-logo-use-imagick branch from dab4abd to 8dc8e44 Compare June 27, 2026 01:24
sbreker added 2 commits June 26, 2026 18:27
Replace the previous crop-only behavior with resize-and-crop processing
for repository logo and banner uploads. Images are now scaled to cover
the target dimensions while preserving aspect ratio, then center-cropped
to the final logo or banner size.

This keeps uploaded assets small after processing and avoids squashing
non-square source images.

Also increased the allowed upload size from 256K to 500K to give users
more room to upload larger source images before resize and crop.
Set Imagick memory, map, and pixel-area limits before reading
repository logo and banner uploads.
@sbreker sbreker force-pushed the dev/repo-logo-use-imagick branch from 8dc8e44 to 3869a0a Compare June 27, 2026 01:28
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.

1 participant