Change parameter to PostMedias in Item::makeImageGrid

- Add dimension rescaling when updating the preview URL
This commit is contained in:
Hypolite Petovan 2023-09-29 00:36:06 -04:00
commit 3333d4af88
3 changed files with 89 additions and 13 deletions

View file

@ -1,5 +1,5 @@
{{if $image.preview}}
<a data-fancybox="{{$image.attachment->uriId}}" href="{{$image.attachment->url}}"><img src="{{$image.preview}}" alt="{{$image.attachment->description}}" title="{{$image.attachment->description}}" loading="lazy"></a>
{{if $image->preview}}
<a data-fancybox="{{$image->uriId}}" href="{{$image->url}}"><img src="{{$image->preview}}" alt="{{$image->description}}" title="{{$image->description}}" loading="lazy"></a>
{{else}}
<img src="{{$image.src}}" alt="{{$image.attachment->description}}" title="{{$image.attachment->description}}" loading="lazy">
<img src="{{$image->url}}" alt="{{$image->description}}" title="{{$image->description}}" loading="lazy">
{{/if}}