Skip to content

Commit 07ae1ae

Browse files
committed
Fix article hero image cropping
1 parent 2b25298 commit 07ae1ae

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

app/a/[slug]/BlogPostClient.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ export default function BlogPostPage({ post }: { post: BlogPost }) {
3838
<div className="bg-white shadow-xl overflow-hidden border border-gradient-to-r from-[#228B22]/10 to-[#FFBF00]/10">
3939
{/* Hero Image */}
4040
{post.image && (
41-
<div className="relative h-64 md:h-96">
41+
<div className="relative w-full">
4242
<Image
4343
src={post.image}
4444
alt={post.title}
45-
fill
46-
className="object-cover"
45+
width={1600}
46+
height={900}
47+
sizes="(max-width: 768px) 100vw, 800px"
48+
className="w-full h-auto"
4749
priority
4850
/>
4951
<div className="absolute inset-0 bg-gradient-to-t from-black/20 to-transparent" />

0 commit comments

Comments
 (0)