Repository navigation
perf(preview): generate small previews with Imaginary from the original - #65150
Merged
Merged
Conversation
CarlSchwan
requested review from
leftybournes,
provokateurin,
salmart-dev and
sorbaugh
and removed request for
a team
October 5, 2026 15:06
CarlSchwan
force-pushed
the
carl/preview-imaginary-resize
branch
2 times, most recently
from
October 5, 2026 17:45
1d88fdc to
6e75735
Compare
skjnldsv
approved these changes
Oct 23, 2026
susnux
approved these changes
Dec 3, 2026
With Imaginary, only the max preview was generated by Imaginary. Every other size was then resized in PHP from the fully decoded max preview, which is exactly the work Imaginary is meant to take over. Let Imaginary generate them from the original file instead: libvips decodes a JPEG at a reduced size, so a 256px preview of a 12 MP photo takes about 80ms instead of a few hundred. A smaller cached preview is still preferred, resizing it is cheaper than sending the original to Imaginary. Cropped previews generated this way use the smartcrop of Imaginary instead of a center crop. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
susnux
force-pushed
the
carl/preview-imaginary-resize
branch
from
December 5, 2026 23:58
6e75735 to
ddc70f7
Compare
Preview::setMimeType() only accepts a string, so the shared helper now requires one: callers that already checked the mime type pass the checked value, which keeps psalm green with a smaller baseline. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
5 of 7 tasks
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.
Summary
TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)