Skip to content

Commit a8704cf

Browse files
committed
Fix 'Images sometimes not loading in HighlightedPosts'
1 parent efdf418 commit a8704cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/blog/GridItem.astro

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ const image = await findImage(post.image);
1616
---
1717

1818
<article class="mb-6 transition">
19-
<div class="relative h-0 pb-[56.25%] lg:h-64 overflow-hidden bg-gray-400 dark:bg-slate-700 rounded shadow-lg mb-6">
19+
<div class="relative md:h-64 bg-gray-400 dark:bg-slate-700 rounded shadow-lg mb-6">
2020
{
2121
image && (
2222
<Picture
2323
src={image}
24-
class="object-cover w-full lg:h-64 rounded shadow-lg bg-gray-400 dark:bg-slate-700"
24+
class="md:object-cover w-full md:w-auto md:h-full rounded shadow-lg bg-gray-400 dark:bg-slate-700"
2525
widths={[400, 900]}
26+
width="400"
27+
height="224"
2628
sizes="(max-width: 900px) 400px, 900px"
2729
alt={post.title}
2830
aspectRatio="16:9"

0 commit comments

Comments
 (0)