Auto retina will fail when Imagick image toolkit is used

Created on 28 March 2023, almost 2 years ago

Problem/Motivation

Auto retina assumes there are only two Image Toolkits available. If Image Toolkit Id is not equal to "imagemagick" it will assume that gd library must be in use. There is at least one more Image Toolkit that is not accounted for: Imagick . If that toolkit is in use, auto retina will fail because it incorrectly assumes Image Toolkit is set to Gd .

See: src/Entity/RetinaImageStyle.php method createDerivative().

Steps to reproduce

Install Imagick module. Go to Administration » Configuration » Media » Image toolkit and change the image toolkit to Imagick.

Proposed resolution

Explicitly check for the image toolkit id. If unknown one is encountered report the error or silently fail. Report unsupported Image Toolkit on the Status report page.

As a bonus, support for Imagick could also be implemented.

Remaining tasks

Implement the proposed solution.

User interface changes

Implement hook_requirements() and add entry for Auto Retina module to Status Report page.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

1.3

Component

Code

Created by

🇷🇸Serbia vaish

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

Comments & Activities

Production build 0.71.5 2024