Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.10
-
Fix Version/s: 4.7
-
Component/s: Drupal Integration Modules
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
The field handler for contact images does not work correctly with Drupal's image module (ie. for resizing images based on Drupal image styles). It outputs URL nonsense.
For good reasons, image module will not handle files that it doesn't already know about. That is, you can't add an arbitrary file path and have image module grab the file and resize it. Instead, image module is returning nonsense. Moreover, if this were the case this would bypass CiviCRM's own access controls for viewing CiviCRM images.
IMO, civicrm_handler_field_contact_image.inc needs to be binned, and replaced with a simple field handler that outputs the image from CiviCRM (with configurable title, alt, width, height fields) or, alternatively, the raw image URL. I'm suggesting not attempting to resize images as part of this handler as this would require a significant amount of work to do properly.
I'm happy to do this work but need the OK that this would be accepted upstream.
Attachments
Issue Links
- supplements
-
CRM-16479 Support image styles for contact image in Drupal Views
- Done/Fixed
- links to