Allow ImageMagic to resize png, jpg and ico images on Sidekiq servers
Problem
gitlab-org/gitlab!22860 (merged) introduced the ability for design images to be resized.
When enabling the design_management_resize_images feature flag on staging:
-
gif,bmpandtifffiles are processed without error -
pngandjpgimages produce the following error in Sentry:
Failed to manipulate with MiniMagick, maybe it is not an image?
Original Error: `gm identify /tmp/mini_magick20200223-16295-1vw9peo` failed with error: gm identify: No decode delegate for this image format (/tmp/mini_magick20200223-16295-1vw9peo). gm identify: Request did not return an image.
Proposal
Allow the ImageMagick library on our Sidekiq servers to process all files that are supported by design management (besides image/svg+xml!):
image/pngimage/jpegimage/bmpimage/gifimage/tiffimage/ico
image/ico appears in that list because I had preemptively expected them to not be supported gitlab-org/gitlab#207069 (closed) however, let's try to support them if we're needing to do work to support jpg and png at the same time.
The above Sentry error suggests the issue happens when running the command gm identify <path/to/image>. gm identify is part of GraphicsMagick library.
References
Edited by Luke Duncalfe