Skip to content
/ dogimg Public

A Dynamic Open Graph Image Generator with URL.

License

Notifications You must be signed in to change notification settings

zeikar/dogimg

Repository files navigation

DOGimg

A Dynamic Open Graph Image Generator with URL.

Generate stunning Open Graph Images for your website with just a URL using DOGimg API. Our API makes it easy to create eye-catching images for social media sharing and SEO optimization.

Try it Out

Check out our demo at https://dogimg.vercel.app. Simply input the URL of the website you want to generate an image for, and let DOGimg do the rest.

Here are some examples of images generated by DOGimg:

https://dogimg.vercel.app https://github.com
dogimg.vercel.app github.com
https://nextjs.org https://vercel.com
nextjs.org vercel.com

How to Use

Meta tags

Add the following meta tags to your HTML to display the generated image:

<meta
  property="og:image"
  content="https://dogimg.vercel.app/api/og?url={YOUR_URL}"
/>
<!-- optional -->
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />

API

You can also access the DOGimg API directly with the following URL format:

https://dogimg.vercel.app/api/og?url={YOUR_URL}

Run DOGimg Locally

To run DOGimg on your own machine, follow these steps:

  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Open http://localhost:3000 in your browser to see the result.

You can also try the API by visiting http://localhost:3000/api/og?url=https://github.com

How it Works

DOGimg works by fetching the HTML of the URL you provide, extracting the title, description, and favicon, and finally generating an image with that information.

License

This project is licensed under the MIT License. You can find the details in the LICENSE file.

Recognition

DOGimg wouldn't be possible without the support from the following projects: