1. Roteador de aplicativos (Next.js 13+)
Opção A: usando icon.tsx (recomendado)
// app/icon.tsx
import { ImageResponse } from 'next/og'
export const size = { width: 32, height: 32 }
export const contentType = 'image/png'
export default function Icon() {
return new ImageResponse(
(
<div style={{ background: '#000', width: '100%', height: '100%' }}>
{/* Your icon content */}
</div>
),
{ ...size }
)
}Opção B: usando API de metadados
// app/layout.tsx
import type { Metadata } from 'next'
export const metadata: Metadata = {
icons: {
icon: [
{ url: '/favicon-16x16.png', sizes: '16x16', type: 'image/png' },
{ url: '/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
],
apple: [
{ url: '/apple-touch-icon.png', sizes: '180x180', type: 'image/png' },
],
},
}