Avoid error in case of missing image

This commit is contained in:
Björn Fromme
2022-03-14 15:48:03 +01:00
parent df73b9886f
commit 0effeb6be9
@@ -9,12 +9,23 @@
<svg class="w-8 h-6 absolute top-0 left-0"> <svg class="w-8 h-6 absolute top-0 left-0">
<use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-flag-{hotel.country.code -> f:format.case(mode: 'lower')}"></use> <use href="{f:uri.image(src: 'EXT:ep_theme/Resources/Public/images/icons_sprite.svg')}#icon-flag-{hotel.country.code -> f:format.case(mode: 'lower')}"></use>
</svg> </svg>
<ep:lazyLoadImage image="{hotel.images.original.0}" <f:if condition="{hotel.images.original.0}">
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png" <f:then>
class="block w-full h-full object-cover" <ep:lazyLoadImage image="{hotel.images.original.0}"
width="360c" loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
height="270c" class="block w-full h-full object-cover"
alt="{hotel.name}" /> width="360c"
height="270c"
alt="{hotel.name}" />
</f:then>
<f:else>
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png"
class="block w-full h-full object-cover"
width="360c"
height="270c"
alt="{hotel.name}" />
</f:else>
</f:if>
</div> </div>
<div class="flex-1 py-4 px-2 bg-white border-l border-r border-gray-200"> <div class="flex-1 py-4 px-2 bg-white border-l border-r border-gray-200">
<span class="headline--3 mb-4"> <span class="headline--3 mb-4">