Answers.Body: <p>Host your image assets outside of the templates directory. A more appropriate place for UI assets is in the <code>/public</code> directory.</p>
  
  <p>Craft is attempting to parse the image like it is a template, which is causing the <code>Unexpected Character</code> error.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-18T15:42:43.313Z
Answers.Text: Thanks. Didn't realise this and built my template structure wrong. Moved assets to the correct place and it works fine now
Answers.UserDisplayName: Adam Hughes
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-18T15:23:20.783Z
Answers.LastActivityDate: 2015-11-20T00:36:08.293Z
Answers.LastEditDate: 2015-11-20T00:36:08.293Z
Answers.UserDisplayName: dgrebb
Answers.Body: <p>Try checking file permissions. This happens to me frequently when copying assets from different people on our team.</p>
  
  <p><a href="http://ifmeister.com/mamp-file-permissions-for-a-local-development-environment/" rel="nofollow">http://ifmeister.com/mamp-file-permissions-for-a-local-development-environment/</a></p>
  
  <p>Use devtools or something else to pull up the image in your browser. If you can't open it, there's a file permission problem.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-17T21:33:16.933Z
Answers.Text: You may also want to look into hosting your image assets outside of the templates directory. A more appropriate place for UI assets is in the `/public` directory.
Answers.UserDisplayName: dgrebb
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-18T10:12:42.653Z
Answers.Text: This was the issue. I had the assets folder inside Templates. I've move it out to the root of my public folder and it works now. Make this an answer and I'll mark it correct.
Answers.UserDisplayName: Adam Hughes
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-17T21:31:35.780Z
Answers.LastActivityDate: 2015-11-17T21:31:35.780Z
Answers.UserDisplayName: dgrebb
Body: <p>I'm uploading a PNG image into my assets folder and linking to it from my css file - standard stuff, nothing special. However the PNG image is returning with a 500 error in the console and not displaying. When I visit the image directly in the browser I get a lot of numbers and:</p>
  
  <pre><code>Template Error
  
  Unexpected character ""
  </code></pre>
  
  <p><a href="https://i.sstatic.net/J6iaa.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/J6iaa.jpg" alt="Screengrab of error"></a></p>
  
  <p>I'm working locally with MAMP Pro and I've only recently restored my computer from scratch. I'm wondering whether this is a Craft issue or potentially a MAMP issue. It works fine if I use a Jpg instead or an externally hosted PNG.</p>
  
  <p>This is also happening when I link to it with an img tag</p>
  
Tags: <assets><error-message><server>
Title: 500 error on PNG images
ThreadText: # 500 error on PNG images
  
  (Asked by: username_0 on 2015-11-17)
  
  I'm uploading a PNG image into my assets folder and linking to it from my css file - standard stuff, nothing special. However the PNG image is returning with a 500 error in the console and not displaying. When I visit the image directly in the browser I get a lot of numbers and:
  
  ```
  Template Error
  
  Unexpected character ""
  
  ```
  
  [![Screengrab of error](https://i.sstatic.net/J6iaa.jpg)](https://i.sstatic.net/J6iaa.jpg)
  
  I'm working locally with MAMP Pro and I've only recently restored my computer from scratch. I'm wondering whether this is a Craft issue or potentially a MAMP issue. It works fine if I use a Jpg instead or an externally hosted PNG.
  
  This is also happening when I link to it with an img tag
  
  **Tags:** assets, error-message, server
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-11-18. Score: 2 | Accepted answer
  
  Host your image assets outside of the templates directory. A more appropriate place for UI assets is in the `/public` directory.
  
  Craft is attempting to parse the image like it is a template, which is causing the `Unexpected Character` error.
  
  > **Comments:**
  > **username_0**: Thanks. Didn't realise this and built my template structure wrong. Moved assets to the correct place and it works fine now  
  
  ---
  
  ### Answer by username_1 on 2015-11-17. Score: 1
  
  Try checking file permissions. This happens to me frequently when copying assets from different people on our team.
  
  <http://ifmeister.com/mamp-file-permissions-for-a-local-development-environment/>
  
  Use devtools or something else to pull up the image in your browser. If you can't open it, there's a file permission problem.
  
  > **Comments:**
  > **username_1**: You may also want to look into hosting your image assets outside of the templates directory. A more appropriate place for UI assets is in the `/public` directory.  
  > **username_0**: This was the issue. I had the assets folder inside Templates. I've move it out to the root of my public folder and it works now. Make this an answer and I'll mark it correct.  
  
  ---
  
  