Answers.Body: <p>Okay, I found the issue.</p>
  
  <p>It was the caching. I cleared the cache in the cp and emptied the <code>craft_assettransformindex</code> table</p>
  
  <p>I deploied the site to my live server but had the image folder on svnIgnore, so craft tought the images would still be there and didn't try to recreate them.</p>
  
  <p>This <a href="https://craftcms.stackexchange.com/questions/117/is-there-a-way-to-force-assets-to-redo-transforms">answer</a> helps.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-27T06:42:06.227Z
Answers.LastActivityDate: 2014-08-27T06:42:06.227Z
Answers.LastEditDate: 2017-04-13T12:50:59.930Z
Answers.UserDisplayName: KSPR
Body: <p>I use a responsive image plugin similar to picturefill.</p>
  
  <p>On my local environement it works well, on my live install however the last trasnform isn't applied and I receive a 404. I guess it might be some memory_limit issue, so I wonder if there is a more efficent way to write this:</p>
  
  <pre><code>{% set fullw_trans_xs = { mode: 'crop', width: 767, } %}
  {% set fullw_trans_sm = { mode: 'crop', width: 768, } %}
  {% set fullw_trans_md = { mode: 'crop', width: 992, } %}
  {% set fullw_trans_lg = { mode: 'crop', width: 1200, } %}
  &lt;img class="bttr img-responsive" alt="{{asset.title}}"
     data-bttrlazyloading-xs='{"src": "{{ asset.getUrl(fullw_trans_xs) }}", "width" : {{ asset.getWidth(fullw_trans_xs) }},  "height" : {{ asset.getHeight(fullw_trans_xs) }}}'
     data-bttrlazyloading-sm='{"src": "{{ asset.getUrl(fullw_trans_sm) }}", "width" : {{ asset.getWidth(fullw_trans_sm) }},  "height" : {{ asset.getHeight(fullw_trans_sm) }}}'
     data-bttrlazyloading-md='{"src": "{{ asset.getUrl(fullw_trans_md) }}", "width" : {{ asset.getWidth(fullw_trans_md) }},  "height" : {{ asset.getHeight(fullw_trans_md) }}}'
     data-bttrlazyloading-lg='{"src": "{{ asset.getUrl(fullw_trans_lg) }}", "width" : {{ asset.getWidth(fullw_trans_lg) }},  "height" : {{ asset.getHeight(fullw_trans_lg) }}}'
              /&gt;
  </code></pre>
  
  <p>I saw the answer of Brandon Kelly about <a href="https://craftcms.stackexchange.com/questions/1723/how-can-i-automatically-generate-responsive-images-from-a-single-hi-res-asset/1724#1724">retina images</a> with that macro thing but frankly, I don't get it. Could that be applied in some way to solve this problem as well?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-25T07:23:43.193Z
Comments.Text: Macros wouldn't help, they only enable you to write the code more DRY. But in the end, it'd trigger the same asset transforms as you have right now.
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-25T08:25:42.333Z
Comments.Text: What carlcs said. Also, did you make sure you had  'generateTransformsBeforePageLoad' => true, in your general.php file ? That's the best practice when using things like picturefill as it forces Craft to generate all transforms whatever the displayed images ends up being.
Comments.UserDisplayName: Jérôme Coupé
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-25T14:54:34.150Z
Comments.Text: You can verify if it's a memory_limit issue by looking in your craft/storage/runtime/logs/phperrors.log file.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-26T14:10:52.097Z
Comments.Text: I added `'generateTransformsBeforePageLoad' => true,` and checked for phperrors.log but they are empty. The ima of `fullw_trans_lg` are still not generated. Any other way to debug this?
Comments.UserDisplayName: KSPR
Tags: <image-transforms><responsive-images>
Title: Efficiently writing multiple transforms
ThreadText: # Efficiently writing multiple transforms
  
  (Asked by: username_0 on 2014-08-25)
  
  I use a responsive image plugin similar to picturefill.
  
  On my local environement it works well, on my live install however the last trasnform isn't applied and I receive a 404. I guess it might be some memory\_limit issue, so I wonder if there is a more efficent way to write this:
  
  ```
  {% set fullw_trans_xs = { mode: 'crop', width: 767, } %}
  {% set fullw_trans_sm = { mode: 'crop', width: 768, } %}
  {% set fullw_trans_md = { mode: 'crop', width: 992, } %}
  {% set fullw_trans_lg = { mode: 'crop', width: 1200, } %}
  <img class="bttr img-responsive" alt="{{asset.title}}"
     data-bttrlazyloading-xs='{"src": "{{ asset.getUrl(fullw_trans_xs) }}", "width" : {{ asset.getWidth(fullw_trans_xs) }},  "height" : {{ asset.getHeight(fullw_trans_xs) }}}'
     data-bttrlazyloading-sm='{"src": "{{ asset.getUrl(fullw_trans_sm) }}", "width" : {{ asset.getWidth(fullw_trans_sm) }},  "height" : {{ asset.getHeight(fullw_trans_sm) }}}'
     data-bttrlazyloading-md='{"src": "{{ asset.getUrl(fullw_trans_md) }}", "width" : {{ asset.getWidth(fullw_trans_md) }},  "height" : {{ asset.getHeight(fullw_trans_md) }}}'
     data-bttrlazyloading-lg='{"src": "{{ asset.getUrl(fullw_trans_lg) }}", "width" : {{ asset.getWidth(fullw_trans_lg) }},  "height" : {{ asset.getHeight(fullw_trans_lg) }}}'
              />
  
  ```
  
  I saw the answer of Brandon Kelly about [retina images](https://craftcms.stackexchange.com/questions/1723/how-can-i-automatically-generate-responsive-images-from-a-single-hi-res-asset/1724#1724) with that macro thing but frankly, I don't get it. Could that be applied in some way to solve this problem as well?
  
  **Tags:** image-transforms, responsive-images
  
  > **Comments:**
  > **username_1**: Macros wouldn't help, they only enable you to write the code more DRY. But in the end, it'd trigger the same asset transforms as you have right now.  
  > **username_2**: What username_1 said. Also, did you make sure you had  'generateTransformsBeforePageLoad' => true, in your general.php file ? That's the best practice when using things like picturefill as it forces Craft to generate all transforms whatever the displayed images ends up being.  
  > **username_3**: You can verify if it's a memory_limit issue by looking in your craft/storage/runtime/logs/phperrors.log file.  
  > **username_0**: I added `'generateTransformsBeforePageLoad' => true,` and checked for phperrors.log but they are empty. The ima of `fullw_trans_lg` are still not generated. Any other way to debug this?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2014-08-27. Score: 0 | Accepted answer
  
  Okay, I found the issue.
  
  It was the caching. I cleared the cache in the cp and emptied the `craft_assettransformindex` table
  
  I deploied the site to my live server but had the image folder on svnIgnore, so craft tought the images would still be there and didn't try to recreate them.
  
  This [answer](https://craftcms.stackexchange.com/questions/117/is-there-a-way-to-force-assets-to-redo-transforms) helps.
  
  
  ---
  
  