Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Not functional] - Social images #437

Closed
RyRy79261 opened this issue Jan 9, 2023 · 6 comments · Fixed by #594
Closed

[Not functional] - Social images #437

RyRy79261 opened this issue Jan 9, 2023 · 6 comments · Fixed by #594

Comments

@RyRy79261
Copy link

RyRy79261 commented Jan 9, 2023

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

@transitive-bullshit
Copy link
Owner

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?

@Sai-Santosh-Pal
Copy link

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

@RyRy79261
Copy link
Author

@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

@sureshHARDIYA
Copy link

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.

@abhidadhaniya23
Copy link

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

onnimonni added a commit to onnimonni/nextjs-notion-starter-kit that referenced this issue Jan 31, 2024
onnimonni added a commit to travelingvanproblem/travelingvanproblem.com that referenced this issue Jan 31, 2024
* document-fix-for-social-media-preview-images:
  Document the Deployment Protection setting causing 401 Unauthorized for preview images in Vercel. fixes transitive-bullshit#435, fixes transitive-bullshit#437
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants