Icon per tenant with icon.tsx not working
Unanswered
Whiteleg shrimp posted this in #help-forum
Whiteleg shrimpOP
Hi, I have this code for rendering each tenant icon. The file is at /tenants/[tenantId]/icon.tsx
The issue is the console.log is never showing up so I think there's an issue.
The issue is the console.log is never showing up so I think there's an issue.
import { ImageResponse } from "next/og"
export const size = {
width: 32,
height: 32,
}
export const contentType = "image/png"
export default function Icon() {
console.log("Rendering icon 0")
return new ImageResponse(
(
<div
style={{
fontSize: 24,
background: "black",
width: "100%",
height: "100%",
display: "flex",
alignItems: "center",
justifyContent: "center",
color: "white",
}}
>
A
</div>
),
{ ...size }
)
}
17 Replies
it should be opengraph-image.tsx
@Yi Lon Ma I think you are trying to render an opengraph image
Whiteleg shrimpOP
I'm trying to render a custom favicon
ahh, didn't know about this lol
@Yi Lon Ma ahh, didn't know about this lol
just a speculation. The browser caches the favicons very aggressively. Could you disable cache in network tab and show hard refresh?
Whiteleg shrimpOP
Nope
And in the console is no output
Whiteleg shrimpOP
Just a 404 :c
And still an empty console
Do you think it is a NextJS bug?
yes, it is supposed to be icon