Skip to content

ImageMagick - error when format not supported #6411

@Oldiesmann

Description

@Oldiesmann

Description

By default, SMF will use ImageMagick for resizing images and generating thumbnails, assuming you have it installed and have PHP configured with either of the two supported extensions (IMagick and Magickwand). However, on the off chance that ImageMagick isn't configured properly, the user will get an error when they try to do something like uploading an image (see https://www.simplemachines.org/community/index.php?topic=575983.0).

Although it's unlikely for this to happen, we should have something in place to use GD in place of ImageMagick in this situation, rather than breaking altogether. We can check by using \IMagick::queryFormats() or MagickQueryFormats().

Steps to reproduce

  1. Install ImageMagick without support for one of the 5 formats SMF supports (JPEG, PNG, GIF, BMP or WBMP) and configure PHP with the iMagick extension (it appears the MagickWand extension isn't supported any longer)
  2. Try to upload an avatar with an unsupported format

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions