It is possible to define a manual icon set using gatsby-plugin-manifest. There, you can theoretically add different icons for different sizes. However, this is not a proper solution as there is no clear way to distinguish between favicons and app manifest icons (e.g. what is shown on mobile devices when the page is saved to the home screen).
I personally solved this problem by using gatsby-plugin-manifest only for the app icons and configure the favicons using react-helmet:
gatsby-config.js:
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `My app`,
short_name: `My app`,
start_url: `/`,
background_color: `#FFFFFF`,
theme_color: `#000000`,
display: `standalone`,
icon: `src/images/icon.png`,
include_favicon: false, // exclude favicons
},
},
`gatsby-plugin-react-helmet`,
Seo.jsx component:
import favicon16x16 from "../images/favicon-16x16.png";
import favicon32x32 from "../images/favicon-32x32.png";
import favicon64x64 from "../images/favicon-64x64.png";
const faviconLinks = [
{ rel: "icon", type: "image/png", sizes: "16x16", href: favicon16x16 },
{ rel: "icon", type: "image/png", sizes: "32x32", href: favicon32x32 },
{ rel: "shortcut icon", type: "image/png", href: favicon64x64 },
];
export default () => (
<Helmet link={faviconLinks}>
<title>My app</title>
</Helmet>
);