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,6 +110,7 @@
</f:section> </f:section>
<f:section name="PictureTag"> <f:section name="PictureTag">
<f:if condition="{image}">
<picture class="searchresult-item__image"> <picture class="searchresult-item__image">
<source media="(max-width: 768px)" srcset="{f:uri.image(image: image, width: '220', height: '130c-100')} 220w"/> <source media="(max-width: 768px)" srcset="{f:uri.image(image: image, width: '220', height: '130c-100')} 220w"/>
<source media="(max-width: 1200px)" srcset="{f:uri.image(image: image, width: '280', height: '220c-100')} 280w"/> <source media="(max-width: 1200px)" srcset="{f:uri.image(image: image, width: '280', height: '220c-100')} 280w"/>
@@ -117,6 +118,7 @@
<img class="scale" src="{f:uri.image(image: image, width: '260', height: '200c-100')}" <img class="scale" src="{f:uri.image(image: image, width: '260', height: '200c-100')}"
title="{image.title}" alt="{image.alternative}"> title="{image.title}" alt="{image.alternative}">
</picture> </picture>
</f:if>
</f:section> </f:section>
</html> </html>