Skip to content

Commit

Permalink
chore: optimised lcp for add-network
Browse files Browse the repository at this point in the history
  • Loading branch information
Dozie2001 committed Dec 28, 2024
1 parent aee3439 commit d96258d
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/[locale]/learn/wallets/add-network/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const AddNewChainPage: NextPage<Props> = async ({ params }) => {
<div className="flex flex-col sm:flex-row gap-x-4 max-sm:max-w-sm">
<p>
<Image
src="/assets/images/learn/wallets/add-network/metamask-add-network-1.png"
src="/assets/images/learn/wallets/add-network/metamask-add-network-1.webp"
alt="MetaMask Add Network 1"
width={712}
height={784}
Expand All @@ -88,7 +88,7 @@ const AddNewChainPage: NextPage<Props> = async ({ params }) => {
</p>
<p>
<Image
src="/assets/images/learn/wallets/add-network/metamask-add-network-2.png"
src="/assets/images/learn/wallets/add-network/metamask-add-network-2.webp"
alt="MetaMask Add Network 2"
width={712}
height={784}
Expand Down
2 changes: 1 addition & 1 deletion app/[locale]/og.jpg/learn/[category]/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function GET(req: Request, { params }: Props) {
const t = await getTranslations({ locale: params.locale });

const title = t(`learn.sections.${params.category}.title`);
const background = loadDataUrl(`public/assets/images/learn/${params.category}/cover.jpg`, 'image/jpeg');
const background = loadDataUrl(`public/assets/images/learn/${params.category}/cover.webp`, 'image/webp');

return generateOgImage({ title, background });
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function GET(req: Request, { params }: Props) {

const chainName = getChainName(getChainIdFromSlug(params.slug));
const title = t('learn.add_network.title', { chainName });
const background = loadDataUrl('public/assets/images/learn/wallets/add-network/cover.jpg', 'image/jpeg');
const background = loadDataUrl('public/assets/images/learn/wallets/add-network/cover.webp', 'image/webp');

return generateOgImage({ title, background });
}
2 changes: 1 addition & 1 deletion app/[locale]/og.jpg/learn/wallets/add-network/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function GET(req: Request, { params }: Props) {
const t = await getTranslations({ locale: params.locale });

const title = t('learn.add_network.sidebar_title');
const background = loadDataUrl('public/assets/images/learn/wallets/add-network/cover.jpg', 'image/jpeg');
const background = loadDataUrl('public/assets/images/learn/wallets/add-network/cover.webp', 'image/webp');

return generateOgImage({ title, background });
}
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed public/assets/images/learn/wallets/cover.jpg
Binary file not shown.
Binary file added public/assets/images/learn/wallets/cover.webp
Binary file not shown.

0 comments on commit d96258d

Please sign in to comment.