[drupal-devel] [bug] Can't upload picture/avatar without PHP GD
drupal-devel at drupal.org
Thu Feb 17 18:18:28 UTC 2005
Category: bug reports
Assigned to: Anonymous
Reported by: mathias
Updated by: mathias
Attachment: http://drupal.org/files/issues/image_get_toolkit_load_gd_on_existance.patch (3.74 KB)
When validating a user's picture, we currently send the file to
image_scale() to automatically resize the image. This works great, but
also assumes that an image toolkit is loaded to perform this action.
If no toolkit is loaded, the user will always receive an error message
even if the image is within specs, causing the upload to fail.
This patch make image_get_toolkit() return the current toolkit only if
it's enabled, that way we can use the elegant image_scale approach if a
toolkit is present, or resort to the old way of checking width and
height for a user's picture if need be.
More information about the drupal-devel