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 allocation of image to generate og:image #3

Open
gouravg8 opened this issue Aug 14, 2024 · 0 comments
Open

dynamic allocation of image to generate og:image #3

gouravg8 opened this issue Aug 14, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@gouravg8
Copy link
Owner

  • og:image is generated on each news article dynamically,
    it should allocate the URL of the image like this:
    when generating the metadata's image of an opengraph, if the image is already a URL (because I'm storing the direct URL of the image of an article) then put it directly to it as it is
    url: post.image
    , otherwise, add the current hostname of the page like this:
    url : hostname + "/api/og?image" + post.image

og_image

@gouravg8 gouravg8 added the good first issue Good for newcomers label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant