Skip to content

Commit

Permalink
refactor(web): image optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
krystxf committed Nov 5, 2024
1 parent fdb949c commit 9448e96
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const nextConfig = {
pageExtensions: ["js", "jsx", "md", "mdx", "ts", "tsx"],
images: {
formats: ["image/avif", "image/webp"],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
},
};

Expand Down
7 changes: 5 additions & 2 deletions apps/web/src/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ const NotFoundPage = () => {
className="font-bold text-zinc-800 text-5xl flex items-center gap-2"
>
<Image
className="rounded-lg h-12 w-auto"
src={MetroNowIcon}
className="rounded-lg"
alt="Icon"
src={MetroNowIcon}
placeholder="blur"
height={48}
priority
/>
Metro&nbsp;Now
</Link>
Expand Down
11 changes: 8 additions & 3 deletions apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ const LandingPage = () => {
<div className="flex flex-col gap-2 items-center justify-center text-center">
<h1 className="text-6xl font-bold text-zinc-800 flex gap-2 items-center">
<Image
className="rounded-xl h-14 w-auto"
src={MetroNowIcon}
className="rounded-xl"
alt="Icon"
src={MetroNowIcon}
placeholder="blur"
height={56}
priority
/>
Metro&nbsp;Now!
</h1>
Expand All @@ -37,16 +40,18 @@ const LandingPage = () => {
className="mt-4"
alt="Download on App Store"
height={50}
priority
/>
</Link>
</div>
<Image
src={MetroNowWatch}
alt="Apple watch screenshots"
height={1200}
placeholder="blur"
quality={90}
priority
/>

<div className="mb-32 gap-4 grid text-center lg:mb-0 lg:w-full lg:max-w-7xl lg:grid-cols-3 lg:text-left">
<Card className="group">
<Link
Expand Down

0 comments on commit 9448e96

Please sign in to comment.