CRM-3226 Some image files are not displayed as intended in custom field groups

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.0, 2.1
    • Fix Version/s: 2.1
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      The expected behavior for .jpg files when uploaded to a custom field of type = file is that the image will be displayed on the contact summary screen. This works for some .jpg files and does NOT work for others. In the 2nd case, only a link to download the file is displayed.

      Hopefullly we can figure out what causes this and get more consistent results.

      There have also been reports on the forums of png files NOT working as expected. The intention is that .gif, .jpg and .png files all display the image.

      I've attached an example of a .jpg that works as expected an one that does not (tested on trunk sandbox).

        Attachments

        1. image-2_be83ddc8f976d7758b1eeff3f84eac30.jpg
          40 kB
          David Greenberg
        2. o.png
          305 kB
          Yashodha Chaku
        3. Scout1.jpg
          60 kB
          David Greenberg

          Activity

          [CRM-3226] Some image files are not displayed as intended in custom field groups
          David Greenberg added a comment -

          This .jpg works as expected.

          David Greenberg added a comment -

          This one came from a user, and doesn't work as expected (only a link is displayed when uploaded to a custom field of type = file).

          Donald A. Lobo added a comment -


          We base the display based on mime/type sent by the browser. Rather than sending image/jpeg, IE sends image/pjpeg, hence images uploaded from IE did not work

          Yashodha Chaku added a comment -

          This doesnot work as expected when the attached file is uploaded in IE.

          Yashodha Chaku added a comment -

          -fixed/tested in -r16410

          Amiteshwar Prasad added a comment -

          Checked with r18888

            People

            • Assignee:
              Amiteshwar Prasad
              Reporter:
              David Greenberg

              Dates

              • Created:
                Updated:
                Resolved: