[TASK] Add fileExtension to image rendering
This commit is contained in:
parent
1c5fd77759
commit
3dea1601d2
@ -5,8 +5,8 @@
|
||||
<f:section name="Content">
|
||||
<f:if condition="{posts.0} && {posts.0.featuredImage}">
|
||||
<f:asset.css identifier="blog_latest_featured_image">
|
||||
@media (max-width:1023px){ .bg-featured-image { --featured-image-url: url(<f:uri.image image="{posts.0.featuredImage}" cropVariant="latest" maxWidth="908" maxHeight="c320"/>); } }
|
||||
@media (min-width:1024px){ .bg-featured-image { --featured-image-url: url(<f:uri.image image="{posts.0.featuredImage}" cropVariant="latest" maxWidth="910" maxHeight="1080"/>); } }
|
||||
@media (max-width:1023px){ .bg-featured-image { --featured-image-url: url(<f:uri.image image="{posts.0.featuredImage}" cropVariant="latest" maxWidth="908" maxHeight="c320" fileExtension="webp"/>); } }
|
||||
@media (min-width:1024px){ .bg-featured-image { --featured-image-url: url(<f:uri.image image="{posts.0.featuredImage}" cropVariant="latest" maxWidth="910" maxHeight="1080" fileExtension="webp"/>); } }
|
||||
</f:asset.css>
|
||||
</f:if>
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<f:if condition="{post.featuredImage}">
|
||||
<f:then>
|
||||
<f:link.page pageUid="{post.uid}" title="{post.title}" class="row-span-full">
|
||||
<img src="{f:uri.image(image: post.featuredImage, width: 140, height: 140, cropVariant: 'list')}"
|
||||
<img src="{f:uri.image(image: post.featuredImage, width: 140, height: 140, cropVariant: 'list', fileExtension: 'webp')}"
|
||||
alt="{post.featuredImage.alternative}"
|
||||
class="w-36 h-36"/>
|
||||
</f:link.page>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user