Avoid exception caused by missing image

This commit is contained in:
Björn Fromme
2018-09-24 14:24:48 +02:00
parent 068dc5e2f7
commit 67c8d839fd
@@ -110,13 +110,15 @@
</f:section> </f:section>
<f:section name="PictureTag"> <f:section name="PictureTag">
<picture class="searchresult-item__image"> <f:if condition="{image}">
<source media="(max-width: 768px)" srcset="{f:uri.image(image: image, width: '220', height: '130c-100')} 220w"/> <picture class="searchresult-item__image">
<source media="(max-width: 1200px)" srcset="{f:uri.image(image: image, width: '280', height: '220c-100')} 280w"/> <source media="(max-width: 768px)" srcset="{f:uri.image(image: image, width: '220', height: '130c-100')} 220w"/>
<source media="(min-width: 1201px)" srcset="{f:uri.image(image: image, width: '260', height: '200c-100')} 260w"/> <source media="(max-width: 1200px)" srcset="{f:uri.image(image: image, width: '280', height: '220c-100')} 280w"/>
<img class="scale" src="{f:uri.image(image: image, width: '260', height: '200c-100')}" <source media="(min-width: 1201px)" srcset="{f:uri.image(image: image, width: '260', height: '200c-100')} 260w"/>
title="{image.title}" alt="{image.alternative}"> <img class="scale" src="{f:uri.image(image: image, width: '260', height: '200c-100')}"
</picture> title="{image.title}" alt="{image.alternative}">
</picture>
</f:if>
</f:section> </f:section>
</html> </html>