image_imagemagick_get_info() should use Imagemagick Identify command

Created on 13 August 2013, almost 12 years ago
Updated 20 January 2025, 5 months ago

The image_imagemagick_get_info() function currently uses the core PHP function getimagesize() for retrieving information about an image. This works well with image formats that PHP can handle, but fails completely when getting information about other image file formats. As the Imagemagick module already uses the convert command line application, it could also use the identify command line application for retrieving basic information about an image.

The attached patch allows a maintainer (by setting the variable imagemagick_use_identify to TRUE) to specify that the identify command should be used to retrieve image dimensions, rather than the getimagesize() function. The patch then allows us to upload, for example, SVG images, and have them converted and displayed as JPEGs.

Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom sdrycroft

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024