Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17638

Views: contact_picture field handler broken

    Details

    • 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

            Activity

              People

              • Assignee:
                colemanw Coleman Watts
                Reporter:
                torrance123 Torrance
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: