Repository navigation
fix(Images): handle unsupported or missing extension in ImageMagickHandler::save() - #10746
Merged
michalsn merged 1 commit intoNov 13, 2026
Conversation
paulbalandan
reviewed
Nov 9, 2026
gr8man
force-pushed
the
fix/imagemagick-save-unsupported-extension
branch
from
November 9, 2026 18:52
893c05c to
981e676
Compare
michalsn
requested changes
Nov 12, 2026
michalsn
left a comment
Member
There was a problem hiding this comment.
Could you also update the note under Converting Images? With this change, the ImageMagick handler uses $imageType as a fallback when the target has no extension or an unsupported extension:
When using ImageMagick, a supported target filename extension determines the output format and takes precedence over $imageType. If the target has no extension or an unsupported extension, the handler uses $imageType instead.
Please also update the existing note about save() under Image Quality to mention this fallback, while preserving the guidance about format prefixes and input validation.
gr8man
force-pushed
the
fix/imagemagick-save-unsupported-extension
branch
from
November 12, 2026 10:49
981e676 to
7f9cb5f
Compare
michalsn
approved these changes
Nov 12, 2026
paulbalandan
approved these changes
Nov 12, 2026
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.
Description
ImageMagickHandler::save()unconditionally called$this->resource->setImageFormat($extension)outside of error handling, throwing an uncaughtImagickExceptionwhen saving without an extension or with an unsupported extension (e.g.,.tmp). This change checks againstImagick::queryFormats(), falls back to the current image type format, and wraps the operation in standard image save failure handling.Checklist: