Answers.Body: <p>Do you have Shoreditch theme installed? This will complicate a few things in WordPress and even the fabulous CiviCRM Admin Utilities WP-Plugin won't fix it.</p>
  <p>Try this extension from bgm: <a href="https://civicrm.org/extensions/shoreditch-wordpress-workarounds" rel="nofollow noreferrer">https://civicrm.org/extensions/shoreditch-wordpress-workarounds</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-24T16:02:39.260Z
Answers.Text: I don't have Shoreditch installed and I've indicated what the problem was. I think you are referring to the Shoreditch CiviCRM extension which requires Drupal. Not clear what specific problems the extension you reference refers to. But there is also a WordPress theme called Shoreditch!
Answers.UserDisplayName: Mick Kahn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-25T23:13:40.780Z
Answers.Text: You are able to install Shoreditch CiviCRM-extension on WordPress, too. UX is worth it! But please fix small problems with bgm's extra-extension because Shoreditch is for Drupal mainly. 
  
  functions.php resolved your issue - fine ;)
Answers.UserDisplayName: wintermoor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-23T14:35:57.970Z
Answers.LastActivityDate: 2020-09-23T14:35:57.970Z
Answers.UserDisplayName: wintermoor
Answers.Body: <p>Eventually I found out what the problem is and it is caused by the child theme that I had created. Another problem elsewhere that had an extra blank line at the start of a news feed and Demerit's comment above suggested this as a solution. When I changed to the base theme all was fine. Going back to functions.php for the child theme I found a blank line outside  (though not at the start of the file which is why Demerit's suggestion didn't lead me to the solution before).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-02T18:06:27.097Z
Answers.LastActivityDate: 2020-02-03T16:59:25.353Z
Answers.LastEditDate: 2020-02-03T16:59:25.353Z
Answers.UserDisplayName: Mick Kahn
Body: <p>I've attached some JPG files to notes in contact records, but them I can't open them and if I save them locally then most applications can't open teh saved version and say they aren't in a supported file format, though surprising, Adobe Acrobat will open them (which is not a solution for most users).</p>
  
  <p>I'm using WordPress 5.3, CiviCRM 5.15.1</p>
  
  <p>Any ideas what could be going on?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-11T22:56:23.230Z
Comments.Text: I've now found that Word (.docx) files also have problems and Word says I need to select an encoding to make the file readable. But all options leave it as nonsense or hang. So I suspect an encoding issue for JPG as well. I'm uploading and downloading from Windows.
Comments.UserDisplayName: Mick Kahn
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-12T02:48:24.913Z
Comments.Text: I haven't checked 5.15.1 but using windows against https://wpmaster.demo.civicrm.org it works ok for me. If you can't share the full file are you able to edit the question to include the first couple bytes of the file? If you find the file in the civicrm/custom folder on the server you can use something like `od -xc filename.jpg | head` from a shell.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-12T11:05:50.077Z
Comments.Text: It works for me as well on the demo site. I don't have shell access (so can't use od to view the file) but accessing it via cPanel file manager, the file opens fine via any image app, so it looks as if the file is uploaded and stored correctly. Also I think Windows is excluded as I have also tried upload and view from an iPad with exactly the same result.
Comments.UserDisplayName: Mick Kahn
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-12T13:31:59.940Z
Comments.Text: Ok this sounds like you have an extension or customized code file that is inserting a blank line or something, like a php file that doesn't start with `<?php`. If you open the corrupted downloaded file using notepad what do you see at the start of the file?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-12T18:21:09.423Z
Comments.Text: That's very useful and with HxD installed on Windows I can compare the files and indeed there is an 0A at the start of the corrupt file and its fine once that is removed. I get the same on two different installations (different, but neither latest, versions of CiviCRM) and I have no extensions in common and no customised code, but obviously the next step is to try upgrading a site to the latest version or run a clean installation.
Comments.UserDisplayName: Mick Kahn
Tags: <wordpress><theme><images>
Title: JPG files uploaded as notes can't be viewed
ThreadText: # JPG files uploaded as notes can't be viewed
  
  (Asked by: username_0 on 2019-12-11)
  
  I've attached some JPG files to notes in contact records, but them I can't open them and if I save them locally then most applications can't open teh saved version and say they aren't in a supported file format, though surprising, Adobe Acrobat will open them (which is not a solution for most users).
  
  I'm using WordPress 5.3, CiviCRM 5.15.1
  
  Any ideas what could be going on?
  
  **Tags:** wordpress, theme, images
  
  > **Comments:**
  > **username_0**: I've now found that Word (.docx) files also have problems and Word says I need to select an encoding to make the file readable. But all options leave it as nonsense or hang. So I suspect an encoding issue for JPG as well. I'm uploading and downloading from Windows.  
  > **username_1**: I haven't checked 5.15.1 but using windows against https://wpmaster.demo.civicrm.org it works ok for me. If you can't share the full file are you able to edit the question to include the first couple bytes of the file? If you find the file in the civicrm/custom folder on the server you can use something like `od -xc filename.jpg | head` from a shell.  
  > **username_0**: It works for me as well on the demo site. I don't have shell access (so can't use od to view the file) but accessing it via cPanel file manager, the file opens fine via any image app, so it looks as if the file is uploaded and stored correctly. Also I think Windows is excluded as I have also tried upload and view from an iPad with exactly the same result.  
  > **username_1**: Ok this sounds like you have an extension or customized code file that is inserting a blank line or something, like a php file that doesn't start with `<?php`. If you open the corrupted downloaded file using notepad what do you see at the start of the file?  
  > **username_0**: That's very useful and with HxD installed on Windows I can compare the files and indeed there is an 0A at the start of the corrupt file and its fine once that is removed. I get the same on two different installations (different, but neither latest, versions of CiviCRM) and I have no extensions in common and no customised code, but obviously the next step is to try upgrading a site to the latest version or run a clean installation.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2020-02-02. Score: 3 | Accepted answer
  
  Eventually I found out what the problem is and it is caused by the child theme that I had created. Another problem elsewhere that had an extra blank line at the start of a news feed and username_1's comment above suggested this as a solution. When I changed to the base theme all was fine. Going back to functions.php for the child theme I found a blank line outside (though not at the start of the file which is why username_1's suggestion didn't lead me to the solution before).
  
  
  ---
  
  ### Answer by username_2 on 2020-09-23. Score: 0
  
  Do you have Shoreditch theme installed? This will complicate a few things in WordPress and even the fabulous CiviCRM Admin Utilities WP-Plugin won't fix it.
  
  Try this extension from bgm: <https://civicrm.org/extensions/shoreditch-wordpress-workarounds>
  
  > **Comments:**
  > **username_0**: I don't have Shoreditch installed and I've indicated what the problem was. I think you are referring to the Shoreditch CiviCRM extension which requires Drupal. Not clear what specific problems the extension you reference refers to. But there is also a WordPress theme called Shoreditch!  
  > **username_2**: You are able to install Shoreditch CiviCRM-extension on WordPress, too. UX is worth it! But please fix small problems with bgm's extra-extension because Shoreditch is for Drupal mainly.   functions.php resolved your issue - fine ;)  
  
  ---
  
  