Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
image_get_toolkit_load_gd_on_existance.patch | 3.74 KB | matt westgate | |
Comments
Comment #1
walkah CreditAttribution: walkah commented+1 on this patch. Please commit to HEAD
Comment #2
Steven CreditAttribution: Steven commentedI committed this patch to head.
Comment #3
(not verified) CreditAttribution: commentedComment #4
ebarrab CreditAttribution: ebarrab commentedWHEN I UPLOAD/USE IMAGES WITH GUIONS (-) IN THE FILENAME, THEY ARE NOT SHOWN WHEN I EDIT MY ACCOUN ("Or simply select an icon:").
I CHANGE THE FILENAME (ELIMINATING THE GUIONS AND IT WORKS).
I NOTICE IT BECAUSE THE ONLY AVATAR I SEE THERE IS THE GUIONLESS ONE.
Eduardo.
Comment #5
styro CreditAttribution: styro commentedResetting previous issue status (I'm only guessing what the prev version was).
Please don't hijack old unrelated issues - open a new issue for this. And please don't use ALL CAPS.