Skip to content

๐ŸŒฟ Service to generate open graph images & cover images for Bhilai Hacks Hackathon

License

Notifications You must be signed in to change notification settings

pranjalbareth/cover-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โ€Žโ€Ž Bhilai Hacks Cover Machine

GitHub license PRs Welcome Buildi

A service that generates dynamic Covers & Open Graph images for Bhilai Hacks Hackathon.

โœจ How To Use

As a og-Image :

Use the generated image URL in the <head> of your HTML document as the og:image meta property

  <meta property="og:image" content="https://cover-machine.vercel.app/api/image?fileType=png&layoutName=Simple&Text=**Hello**+_World_" />

Whenever this image is requested (e.g. in link previews) the image will be generated on demand.

As a cover

Download the Image in PNG/JPEG and use it for free.

๐Ÿง How It Works

Images are generated through the /api/image route. When you hit this route the following happens

  • Query params are parsed
  • HTML page built, rendered with Puppeteer, and screenshot
  • Screenshot returned with a long cache max age

๐Ÿš€ Development

You can fork this repo, customize, and use in your own projects.

The frontend is a NextJS site and the image generation happens in an API route.

# Install all dependencies
yarn 

# Start local development server
yarn dev

# Build for production
yarn build

# Start in production
yarn start

๐Ÿ™Œ Acknowledgement

Credit where credit is due. This started as a forked repo from Vercel's OG image generator.

Author

Pranjal Bareth

Support

Open Source Love GitHub followers

Thank you for being here!

"Buy Me A Coffee"

About

๐ŸŒฟ Service to generate open graph images & cover images for Bhilai Hacks Hackathon

Resources

License

Stars

Watchers

Forks

Packages

No packages published