Can't have 2 icon.png/icon.jpg
Unanswered
Forest bachac posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Forest bachacOP
Currently, in my app folder I have an icon.png and an icon.jpg. But, when built, only the icon.jpg is loaded.
Is it possible to have >1 icon.png?
Is it possible to have >1 icon.png?
32 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Forest bachacOP
Anyone know?
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
why would you need >1 icon.png? and how will the icon be rendered?
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Forest bachacOP
i want a 32x32 and a 16x16. currently i just have an icon.png and icon.jpg so i can have 2, but only one is rendered when built
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
try creating .ico instead if you want different sizing in one file
I used these https://realfavicongenerator.net/ to generate all the necessary files
note that its not tailored to next.js so it will generate more files than what is needed in Next.js
then you can link them using https://nextjs.org/docs/app/api-reference/functions/generate-metadata#icons or use the file-based metadata (like putting favicon.ico, icon.ico, and apple-icon.ico at the
/app
dir)![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Forest bachacOP
which files should i use
just apple-icon and favicon.ico?
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
next.js supports favicon.ico, apple-icon.ico and icon.ico so
you can use all of those three
and since .ico already has different sizing inside the file, you don't need to worry about 32x32 and 16x16 anymore :)
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Forest bachacOP
it only generates favicon.ico and apple-icon.png
no apple-icon.ico or icon.ico
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
welp you can use those then
you can also just rename favicon.ico to icon.ico
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Forest bachacOP
the issue is that it shows up like this on safari. persisted even after using the thing u sent
![Image](https://cdn.discordapp.com/attachments/1135613187396477049/1135772170543435816/Screenshot_2023-07-31_at_11.12.50_PM.png)
it shows up fine on chrome with transparnet bg
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
sometimes it takes a while for the favicon to update though. Have you made sure you opened it in a new tab?
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Forest bachacOP
yes
is there a way to edit the head in next app dir bc that seems the easiest way to fix this
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
export const metadata
API to manually link the icons'ere
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
add to the
<head>
in your root layout<html lang="en">
<head>
<global head content>
</head>
<body>{children}</body>
</html>
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Forest bachacOP
i googled it, and apparently this issue is made by safari if you image doesnt meet contrast requirements. makes no sense bc my image is like navy blue with white text
but ty for ur help
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
¯_(ツ)_/¯
idk that exists
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Forest bachacOP
i think its bc im in safari dark mode and the navy blue is too close to the dark gray