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

Dynamic OG Image Generation Not Working - Server Setup Required #735

Closed
savvar9991 opened this issue Dec 11, 2024 · 4 comments
Closed

Dynamic OG Image Generation Not Working - Server Setup Required #735

savvar9991 opened this issue Dec 11, 2024 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation sdks All content under https://aptos.dev/en/build/sdks

Comments

@savvar9991
Copy link

Url

https://github.com/aptos-labs/developer-docs/blob/f10a019751ff32603414932c23a50d4ad2eb5b63/apps/nextra/pages/en/developer-platforms/contribute/setup/SEO.mdx

Describe the content issue

Issue Description

The dynamic OG image generation example in the documentation requires a properly configured development server, but currently it's not working due to missing setup.

Current Behavior

  • Dynamic image generation fails
  • Accessing http://localhost:3000/api/og.png returns connection refused
  • Component DynamicImage cannot load images
    image

Section

sdks

@savvar9991 savvar9991 added the documentation Improvements or additions to documentation label Dec 11, 2024
@github-actions github-actions bot added the sdks All content under https://aptos.dev/en/build/sdks label Dec 11, 2024
Copy link

@aptos-labs/developer-platform

@hariria
Copy link
Collaborator

hariria commented Dec 11, 2024

I believe you might be using the wrong port number, should be 3030.

It seems to be working for me in two places

  1. https://aptos.dev/api/og.png

  2. Shows up in the OG image embedded in the docs: https://aptos.dev/en/developer-platforms/contribute/setup/SEO

LMK if this is different from what you're referring to

@savvar9991
Copy link
Author

Thank you for your assistance. I tried using port 3030 as you suggested, and also checked port 3000, but unfortunately, the issue persists. Locally, I am still unable to access the dynamically generated Open Graph images, while everything works correctly on the production server.
Additionally, I would like to note that I did not originally implement this feature, and according to the version history, it appears that it has never functioned correctly locally. This might suggest that there could be an underlying issue that has been overlooked.
Could you share the details of your server configuration or provide information on what settings or dependencies might be crucial for this functionality to work correctly? There might be specific server setup steps that I missed.

@hariria
Copy link
Collaborator

hariria commented Dec 12, 2024

Hmmm, it works fine for me and has worked for me since I implemented the feature... Did you do pnpm build and pnpm start? The opengraph is dynamic so it won't load anything in the Github markdown preview. See below. Maybe try that? For now I will close this issue since it seems to be working properly locally and in production

http://localhost:3030/api/og.png: Screenshot 2024-12-11 at 5 05 29 PM

It's also loading properly on the contribute page.
Screenshot 2024-12-11 at 5 07 21 PM

@hariria hariria closed this as completed Dec 12, 2024
@hariria hariria self-assigned this Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation sdks All content under https://aptos.dev/en/build/sdks
Projects
None yet
Development

No branches or pull requests

2 participants