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 with that macro thing but frankly, I don't get it. Could that be applied in some way to solve this problem as well?
'generateTransformsBeforePageLoad' => true,
and checked for phperrors.log but they are empty. The ima offullw_trans_lg
are still not generated. Any other way to debug this?