I have a problem in CiviCRM when I try to add a contact image into a contact record.
I'm using Drupal 7, CiviCRM 5.13.4 and PHP 7.1.
From what I can make out, something is adding in whitespace to the images that I try and upload which naturally shows the image as being broken.
When I look at the image in the file system, the image is fine there but if I go into the source code of where the image is in a contact record, the image downloads and when I open it, the top line is blank (whitespace).
I have seen this on several sites but can't seem to find an answer anywhere so it would be good to know any possible reasons for this to happen so the fix can be applied to several sites.
I am wondering if it is a rogue module or something similar that is causing the problems. I thought it may be the theme which I disabled to test but the issue remained so that got ruled out.
Any advice would be greatly appreciated!