Ticket 711: image recize on recipes.show

This commit is contained in:
Jérémy Munsch 2022-03-29 10:51:45 +02:00
parent e8c26e2a8d
commit 6dbfe43a67
No known key found for this signature in database
GPG key ID: 55196BEE445F6049
2 changed files with 9 additions and 1 deletions

View file

@ -127,5 +127,13 @@ return [
'breedingWebp' => [ 'breedingWebp' => [
'format' => 'webp' 'format' => 'webp'
], ],
'recipeFilterPNG' => [
'height' => 180,
'width' => 180,
'format' => 'png',
'resize' => true,
'inCanvas' => true,
'keepRatio' => true
],
] ]
]; ];

View file

@ -115,7 +115,7 @@ $vegetal = ($recipe->products->first()->range->slug ?? '') == 'le-vegetal';
@if(count($recipe->products)) @if(count($recipe->products))
<figure> <figure>
@foreach($recipe->products as $product) @foreach($recipe->products as $product)
<img src="{{ $product->picture }}" alt="{{ $product->name }}" /> <img src="{{ asset(resizePublic($product->picture, 'recipeFilterPNG')) }}" alt="{{ $product->name }}" />
@endforeach @endforeach
</figure> </figure>
@endif @endif