
Before we dive in, why not take a quick peek at my portfolio: https://priyalraj.com, & while you’re at it, check out my SaaS venture: https://shavelinks.com, it’s where innovation meets simplicity.
Note: I am trying to keep it simple and straightforward, so I will use very few images to make the post concise and to the point.
If you don’t have a Next.js project yet, run: npx create-next-app folderName . This will create a new folder with everything you need.
Inside your project folder:
src/app folder.favicon.ico file. We’re going to replace it with our own custom set of favicon.layout.tsxOpen src/app/layout.tsx and locate (or create) the metadata export. By default, it looks like this:
export const metadata: Metadata = {title: “Create Next App”,description: “Generated by create next app”,};
Replace or extend it to include your custom icons, as shown below. This snippet configures multiple icon sizes for various devices, including Android, iOS, and desktop browsers.
Please format it accordingly, as due to some limitations, I can’t format it properly here.
export const metadata: Metadata = { title: “Create Next App”, description: “Generated by create next app”, icons: { icon: [ // Android Icons { rel: “icon”, type: “image/png”, sizes: “36x36”, url: “/favicon/android-icon-36x36.png” }, { rel: “icon”, type: “image/png”, sizes: “48x48”, url: “/favicon/android-icon-48x48.png” }, { rel: “icon”, type: “image/png”, sizes: “72x72”, url: “/favicon/android-icon-72x72.png” }, { rel: “icon”, type: “image/png”, sizes: “96x96”, url: “/favicon/android-icon-96x96.png” }, { rel: “icon”, type: “image/png”, sizes: “144x144”, url: “/favicon/android-icon-144x144.png” }, { rel: “icon”, type: “image/png”, sizes: “192x192”, url: “/favicon/android-icon-192x192.png” }, { rel: “icon”, type: “image/png”, sizes: “512x512”, url: “/favicon/android-icon-512x512.png” }, // Apple Icons { rel: “apple-touch-icon”, type: “image/ico”, url: “/favicon/apple-icon.png” }, { rel: “apple-touch-icon”, sizes: “57x57”, url: “/favicon/apple-icon-57x57.png” }, { rel: “apple-touch-icon”, sizes: “60x60”, url: “/favicon/apple-icon-60x60.png” }, { rel: “apple-touch-icon”, sizes: “72x72”, url: “/favicon/apple-icon-72x72.png” }, { rel: “apple-touch-icon”, sizes: “76x76”, url: “/favicon/apple-icon-76x76.png” }, { rel: “apple-touch-icon”, sizes: “114x114”, url: “/favicon/apple-icon-114x114.png” }, { rel: “apple-touch-icon”, sizes: “120x120”, url: “/favicon/apple-icon-120x120.png” }, { rel: “apple-touch-icon”, sizes: “144x144”, url: “/favicon/apple-icon-144x144.png” }, { rel: “apple-touch-icon”, sizes: “152x152”, url: “/favicon/apple-icon-152x152.png” }, { rel: “apple-touch-icon”, sizes: “180x180”, url: “/favicon/apple-icon-180x180.png” }, // Favicon Icons { rel: “icon”, type: “image/ico”, url: “/favicon/favicon.ico” }, { rel: “icon”, type: “image/png”, sizes: “16x16”, url: “/favicon/favicon-16x16.png” }, { rel: “icon”, type: “image/png”, sizes: “32x32”, url: “/favicon/favicon-32x32.png” }, { rel: “icon”, type: “image/png”, sizes: “96x96”, url: “/favicon/favicon-96x96.png” }, ], other: [ { rel: “apple-touch-icon-precomposed”, url: “/favicon/apple-icon-precomposed.png”, }, ], }, manifest: “/favicon/manifest.json”, };
Make sure you have a 512×512 version of your logo. Name it: android-icon-512x512.png . This file is key for larger displays and home screen icons on Android devices.
A sample for 512x512 png image.

Create Favicon button.
3. Download the generated zip file.

Extract the downloaded zip. Inside, you’ll see files named ms-icon-xxx. You can remove all the ms-icon files if you don’t need them (they’re mainly for Microsoft’s older setups).

Rename the extracted folder to: favicon .
public"public if it doesn’t exist already.favicon folder into public.Want a reference? Here it is.
Refresh your site, and your custom favicons should now appear in the browser tab and on mobile devices!
That’s it! You’ve successfully added a complete set of favicons to your Next.js 14 project using the new /app directory approach. By including a variety of icon sizes, your site will look great across all browsers and devices.
If you run into any issues, check out the GitHub repo or the video tutorial. Let me know how it goes in the comments!
If you enjoyed this article, please make sure to Like, Comment and follow me on Twitter.