nextjs-notion-starter-kit icon indicating copy to clipboard operation
nextjs-notion-starter-kit copied to clipboard

[Not functional] - Social images

Open RyRy79261 opened this issue 2 years ago • 5 comments

Description

Social images are not being generated for any page and there is no insight into how these are controlled, set or generated outside of the get request in the code base

RyRy79261 avatar Jan 09 '23 07:01 RyRy79261

They seem to be working on my end: https://transitivebullsh.it/api/social-image?id=b24073e8-4971-4172-aba8-d636448a69c3

The social image code is in an API edge function here: https://github.com/transitive-bullshit/nextjs-notion-starter-kit/blob/main/pages/api/social-image.tsx

It's using the official @vercel/og package for generating social images on the fly.

This approach does have its downsides, though, so if it's not working for your deployment, we can try to figure out what's wrong. Are they working locally when you run the dev server?

transitive-bullshit avatar Jan 10 '23 11:01 transitive-bullshit

@transitive-bullshit I think the API isn't functioning well

Sai-Santosh-Pal avatar Jun 04 '23 06:06 Sai-Santosh-Pal

@transitive-bullshit So I'm aware that its on the fly, however when I step through the code, its not receiving any data or generating anything, but it is loading the Notion page. Not sure what its meant to be loading into the social-image.tsx but yeah, cant get it to respond

RyRy79261 avatar Jun 08 '23 09:06 RyRy79261

I had same issue yesterday, I reduced some extra stuffs from that page like removed date, removed font, and reduced dimension of image and worked fine.

sureshHARDIYA avatar Aug 26 '23 13:08 sureshHARDIYA

I think image generation functionality working properly well and I was facing the problem of- Image generation for social media previews are working well in development (localhost) but in production I was getting unauthorized as response. I find a meaningful solution where I need to change the settings of vercel for this repository and here are the changes I made.

Please disable Vercel Authentication so that every time when you hit the end point, it'll return the generated image as response.

image

abhidadhaniya23 avatar Nov 25 '23 04:11 abhidadhaniya23