Add initial width and height
This commit is contained in:
@ -28,7 +28,10 @@ const { post, url } = Astro.props;
|
|||||||
widths={[400, 900]}
|
widths={[400, 900]}
|
||||||
sizes="(max-width: 900px) 400px, 900px"
|
sizes="(max-width: 900px) 400px, 900px"
|
||||||
alt={post.description}
|
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">
|
<div class="max-w-3xl mx-auto px-4 sm:px-6">
|
||||||
@ -47,7 +50,7 @@ const { post, url } = Astro.props;
|
|||||||
<SocialShare
|
<SocialShare
|
||||||
url={url}
|
url={url}
|
||||||
text={post.title}
|
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>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
@ -51,8 +51,10 @@ import { Picture } from '@astrojs/image/components'
|
|||||||
widths={[400, 768, 1480]}
|
widths={[400, 768, 1480]}
|
||||||
sizes="(max-width: 767px) 400px, (max-width: 1479px) 768px, 1480px"
|
sizes="(max-width: 767px) 400px, (max-width: 1479px) 768px, 1480px"
|
||||||
alt="Hero Image"
|
alt="Hero Image"
|
||||||
aspectRatio="16:9"
|
aspectRatio={1480/833}
|
||||||
loading="eager"
|
loading="eager"
|
||||||
|
width={1480}
|
||||||
|
height={833}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user