generated from autonomic-cooperative/astro-payload-template
Add fallback for img src's
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
523b7c9fd7
commit
0a2dde8009
BIN
astro/public/not-found.png
Normal file
BIN
astro/public/not-found.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
@ -12,7 +12,7 @@ const contentArray = getContentArray(content);
|
||||
} else {
|
||||
return (
|
||||
<Image
|
||||
src={getImageSrc(value.src)}
|
||||
src={getImageSrc(value.src) || "/not-found.png"}
|
||||
width={value.width}
|
||||
height={value.height}
|
||||
format="webp"
|
||||
|
@ -9,9 +9,9 @@ const { post } = Astro.props;
|
||||
>
|
||||
<article class="flex px-5 py-3 gap-8">
|
||||
<Image
|
||||
src={post.thumbnail.url}
|
||||
height="150"
|
||||
aspectRatio="1"
|
||||
src={post.thumbnail.url || "/not-found"}
|
||||
height={150}
|
||||
aspectRatio={1}
|
||||
format="webp"
|
||||
alt={post.thumbnail.alt}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user