Add initial width and height

This commit is contained in:
prototypa
2022-11-24 13:57:21 -05:00
parent d37b2c1eab
commit 02c9282cf2
2 changed files with 8 additions and 3 deletions

View File

@ -28,7 +28,10 @@ const { post, url } = Astro.props;
widths={[400, 900]}
sizes="(max-width: 900px) 400px, 900px"
alt={post.description}
aspectRatio="16:9"
loading="eager"
aspectRatio={16/9}
width={900}
height={506}
/>
) : (
<div class="max-w-3xl mx-auto px-4 sm:px-6">
@ -47,7 +50,7 @@ const { post, url } = Astro.props;
<SocialShare
url={url}
text={post.title}
class="mt-5 sm:mt-1 align-middle text-gray-400 dark:text-slate-600"
class="mt-5 sm:mt-1 align-middle text-gray-500 dark:text-slate-600"
/>
</div>
</article>

View File

@ -51,8 +51,10 @@ import { Picture } from '@astrojs/image/components'
widths={[400, 768, 1480]}
sizes="(max-width: 767px) 400px, (max-width: 1479px) 768px, 1480px"
alt="Hero Image"
aspectRatio="16:9"
aspectRatio={1480/833}
loading="eager"
width={1480}
height={833}
/>
</div>
</div>