perf(images): add sizes prop to improve Next.js image loading

This commit is contained in:
ArvinFarrelP 2026-04-03 22:11:21 +07:00
parent fb20b0444f
commit bb84bb25a3
No known key found for this signature in database
GPG key ID: 8C0AE50DA45372A9
3 changed files with 4 additions and 1 deletions

View file

@ -15,8 +15,9 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {
img: ({ className, alt, ...props }: React.ComponentProps<"img">) => (
<Image
{...(props as ImageProps)}
className={cn("rounded-md border", className)}
alt={alt ?? ""}
sizes="(max-width: 768px) 100vw, 896px"
className={cn("rounded-md border", className)}
/>
),
Video: ({ className, ...props }: React.ComponentProps<"video">) => (