Imagemagick_convert destination not set

Created on 9 September 2011, over 13 years ago
Updated 20 January 2025, 5 months ago

I am using _imagemagick_convert directly from an image style custom action to convert pdfs to jpgs. I cannot get it to work as the destination is always cleared when looking at the imagemagick debug output.

The problem is caused by drupal_realpath($dest) which returns an empty string if the file $dest does not exist. Since this is the image to be created it is very likely not to exist. drupal_realpath should be acting on the path rather than the file so maybe use pathinfo to split the full path name into directory and file and only pass the directory through drupal_realpath?

Am I using this function correctly?

🐛 Bug report
Status

Closed: outdated

Component

Code

Created by

🇬🇧United Kingdom dippers

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