Skip to main content

Command Palette

Search for a command to run...

The Complete Guide to Favicons, App Icons & Social Images in Next.js (2026 Checklist)

Published
β€’4 min read
The Complete Guide to Favicons, App Icons & Social Images in Next.js (2026 Checklist)
A

πŸ€– Curious AI enthusiast and Software Engineer with 7+ years of experience. πŸ› οΈ I enjoy getting my hands dirty with new technologies β€” experimenting, building side projects, and learning by doing. πŸš€ Currently exploring how AI can enhance real-world web applications.

Whenever I start a new Next.js project, I always end up asking the same questions again:

  • What favicon sizes do I need?

  • What image size does Twitter use?

  • Where should icons go in Next.js App Router?

  • Do I need a maskable icon?

So I wrote this short checklist for my future self.

If I follow this post step-by-step, my app will have all required icons and social images.

This guide assumes:

  • Next.js App Router

  • icons placed in /app

  • metadata handled by Next.js metadata system

Next.js automatically detects files like favicon.ico, opengraph-image.png, and twitter-image.png when placed in the app folder and adds them to the page metadata automatically. (Next.js)


Always begin with a square PNG.

Recommended:

logo.png
1024 Γ— 1024
transparent background

Everything else will be generated from this.


🌐 2. Favicons (Browser Tabs)

Favicons are still required for browser tabs and bookmarks.

The .ico format can contain multiple sizes inside a single file, allowing browsers to select the best resolution automatically. (Favicon.io)

Typical sizes inside favicon:

16Γ—16
32Γ—32
48Γ—48
64Γ—64

πŸ”§ Tool I use

https://realfavicongenerator.net

https://www.png2ico.com/

Upload your logo and generate favicon.ico.


πŸ“ Folder placement

/app
  favicon.ico

Next.js automatically detects the file and adds it to <head>. (wisp.blog)


πŸ” Test your favicon

  1. Open your site in Chrome

  2. Check the browser tab icon

Or verify using:

https://realfavicongenerator.net/favicon_checker

https://cards-dev.x.com/validator - For x.com


πŸ“± 3. PWA App Icons (Installable Apps)

These icons appear when a user installs your web app.

Minimum required sizes:

icon-192.png
icon-512.png

PWAs typically require 192Γ—192 and 512Γ—512 icons for installation and splash screens. (Stack Overflow)

Folder structure

/public
  icon-192.png
  icon-512.png
  icon-maskable-512.png

Example manifest.js

export default function manifest() {
  return {
    name: "Your App",
    short_name: "App",
    start_url: "/",
    display: "standalone",
    icons: [
      {
        src: "/icon-192.png",
        sizes: "192x192",
        type: "image/png"
      },
      {
        src: "/icon-512.png",
        sizes: "512x512",
        type: "image/png"
      },
      {
        src: "/icon-maskable-512.png",
        sizes: "512x512",
        type: "image/png",
        purpose: "maskable"
      }
    ]
  }
}

The manifest file defines how your web app behaves when installed and includes the icons used by devices. (MDN Web Docs)


🎨 4. Maskable Icons (Android Adaptive Icons)

Modern PWAs should also include maskable icons.

Android launchers crop icons into shapes (circle, squircle, etc.).
Maskable icons allow your icon to fill the entire shape correctly. (web.dev)

Add this icon:

/public
    icon-maskable-512.png

Updated manifest entry

{
  src: "/icon-maskable-512.png",
  sizes: "512x512",
  type: "image/png",
  purpose: "maskable"
}

Recommended icon set:

icon-192.png
icon-512.png
icon-maskable-512.png

πŸ”— 5. Social Sharing Images

These images appear when someone shares your site on:

  • Twitter / X

  • LinkedIn

  • Facebook

  • Slack

  • Discord

Next.js supports special file names for them.

opengraph-image.png
twitter-image.png

Next.js automatically detects these files when placed in the app folder. (Next.js)

This works across most social platforms.

  1. opengraph-image.png -- 1200x630 pixels

  2. twitter-image.png -- 1200x675 pixels


Folder structure

/app
  opengraph-image.png
  twitter-image.png

⚑ 6. Dynamic Social Images (My Favorite)

Instead of static images, I generate them dynamically.

Example:

/app/api/og/route.js
/app/api/twitter-card/route.js

Using:

ImageResponse from next/og

Next.js supports both static and dynamically generated OG images. (Next.js)

Benefits:

  • centralized branding

  • dynamic titles

  • dynamic backgrounds

  • easy updates


πŸ“‚ Final Folder Structure

When everything is done, /app should look like this:

/app
  favicon.ico
  opengraph-image.png
  twitter-image.png
  manifest.js

βœ… My Personal Icon Checklist

Whenever I launch a new project:

βœ” favicon.ico
βœ” icon-192.png
βœ” icon-512.png
βœ” icon-maskable-512.png
βœ” opengraph-image.png (1200Γ—630)
βœ” twitter-image.png (1200Γ—630)

That’s it.

No guessing.
No Googling again.