Answers.Body: <p>As i was working on a localised website I had to use the full path,
  in my case on MAMP PRO that was:
  /Users/davedriesmans/Documents/Sites/website.dev/public/uploads/photos/</p>
  
  <p>guess i'll have to change then when going into production</p>
  
  <p>use environmentVariables like Mats Mikkel Rummelhoff suggests</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-01T17:09:40.963Z
Answers.Text: You can use [environmentVariables](https://craftcms.com/docs/multi-environment-configs#example-multi-environment-asset-source-settings) for Asset source paths - that way you won't have to change them every time you sync the databases between environments.
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-02T15:33:29.870Z
Answers.LastActivityDate: 2016-01-01T20:52:21.447Z
Answers.LastEditDate: 2016-01-01T20:52:21.447Z
Answers.UserDisplayName: Dave Driesmans
Body: <p>Why do i get an error</p>
  
  <p><em>throw new Exception(Craft::t('Image “{file}” cannot be found.', array('file' => $file->filename)));</em></p>
  
  <p>for </p>
  
  <pre><code>{% set myImage = entry.pr_foto.first %}
  {% set params = { width: 300, height: 200 } %}
  &lt;img  src="{{ myImage.getUrl(params) }}" height="{{ myImage.getHeight(params) }}" width="{{ myImage.getWidth(params) }}" alt=""&gt;
  </code></pre>
  
  <p>while</p>
  
  <pre><code>{% set myImage = entry.pr_foto.first %}
  &lt;img src="{{ myImage.url }}"&gt;
  </code></pre>
  
  <p>shows the image?</p>
  
  <p>The filesystem path for photos is uploads/photos/. The upload works fine in the admin. It's only the transform.</p>
  
  <p>Full trace error:
  <a href="https://i.sstatic.net/bIDzR.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bIDzR.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-01T23:00:31.897Z
Comments.Text: Can you share the full stack trace of the error?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-02T14:55:34.077Z
Comments.Text: - your source image might be missing in this environement.
  
  - your image path might be wrong.
  
  - your image transform might be missing and craft thinks the transform has already been made. (if thats the case empty the table 'craft_assettransformindex' so all transforms will be recreated)
Comments.UserDisplayName: KSPR
Tags: <image-transforms>
Title: Transform: Image {file} cannot be found with
ThreadText: # Transform: Image {file} cannot be found with
  
  (Asked by: username_0 on 2015-12-01)
  
  Why do i get an error
  
  *throw new Exception(Craft::t('Image “{file}” cannot be found.', array('file' => $file->filename)));*
  
  for
  
  ```
  {% set myImage = entry.pr_foto.first %}
  {% set params = { width: 300, height: 200 } %}
  <img  src="{{ myImage.getUrl(params) }}" height="{{ myImage.getHeight(params) }}" width="{{ myImage.getWidth(params) }}" alt="">
  
  ```
  
  while
  
  ```
  {% set myImage = entry.pr_foto.first %}
  <img src="{{ myImage.url }}">
  
  ```
  
  shows the image?
  
  The filesystem path for photos is uploads/photos/. The upload works fine in the admin. It's only the transform.
  
  Full trace error:
  [![enter image description here](https://i.sstatic.net/bIDzR.png)](https://i.sstatic.net/bIDzR.png)
  
  **Tags:** image-transforms
  
  > **Comments:**
  > **username_1**: Can you share the full stack trace of the error?  
  > **username_2**: - your source image might be missing in this environement.  - your image path might be wrong.  - your image transform might be missing and craft thinks the transform has already been made. (if thats the case empty the table 'craft_assettransformindex' so all transforms will be recreated)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-12-02. Score: 1 | Accepted answer
  
  As i was working on a localised website I had to use the full path,
  in my case on MAMP PRO that was:
  /Users/username_0/Documents/Sites/website.dev/public/uploads/photos/
  
  guess i'll have to change then when going into production
  
  use environmentVariables like username_3 suggests
  
  > **Comments:**
  > **username_3**: You can use [environmentVariables](https://craftcms.com/docs/multi-environment-configs#example-multi-environment-asset-source-settings) for Asset source paths - that way you won't have to change them every time you sync the databases between environments.  
  
  ---
  
  