File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 11---
22import { Image } from ' astro:assets' ;
3+ import { getImage } from ' astro:assets' ;
34import { DEFAULT_CONFIGURATION } from ' @/lib/constants'
45
56interface Props {
67 class? : string ;
78}
89const { class : className } = Astro .props ;
10+
11+ const image = await getImage ({ src: DEFAULT_CONFIGURATION .author .avatar , format: ' avif' });
912---
1013
1114<div class:list ={ [
@@ -14,7 +17,7 @@ const { class: className } = Astro.props;
1417]} >
1518 <Image
1619 loading =" eager"
17- src ={ DEFAULT_CONFIGURATION . author . avatar .src }
20+ src ={ image .src }
1821 alt ={ DEFAULT_CONFIGURATION .author .name }
1922 width ={ 52 }
2023 height ={ 52 }
Original file line number Diff line number Diff line change @@ -36,10 +36,8 @@ const { Content } = await render(entry);
3636 { entry .data .image && (
3737 <div class = " relative aspect-video overflow-hidden rounded-lg" >
3838 <Image
39- src = { entry .data .image ?. src }
39+ src = { entry .data .image }
4040 alt = { entry .data .title }
41- width = { entry .data .image ?.width }
42- height = { entry .data .image ?.height }
4341 class = " object-cover"
4442 />
4543 </div >
You can’t perform that action at this time.
0 commit comments