|
4 | 4 | <h1 align="center">OG:IMAGE REST Generator</h1>
|
5 | 5 |
|
6 | 6 | <p align="center">
|
7 |
| - <strong>OG:IMAGE REST Generator</strong> is a free and powerful tool that simplifies the process of generating Open Graph images for your website or application. With our RESTful API, you can quickly and easily create customized images that will make your content stand out on social media platforms like Facebook, Twitter, and LinkedIn. |
| 7 | + <strong>OG:IMAGE REST Generator</strong> is a free and powerful tool that simplifies the process of generating Open Graph images for your website or application. With our RESTful API, you can quickly and easily create customized images that will make your content stand out on social media platforms like Facebook, Twitter, Instagram, Pinterest and LinkedIn. |
8 | 8 | </p>
|
9 | 9 |
|
10 | 10 | <p align="center">
|
|
16 | 16 | https://og-image-rest-generator.fly.dev
|
17 | 17 | ```
|
18 | 18 |
|
19 |
| -## API Reference |
20 |
| - |
21 |
| -#### Generate Simple Image (with gradient background) |
22 |
| - |
| 19 | +## Usage |
23 | 20 | ```http
|
24 |
| -POST /generate |
25 |
| -Content-Type: application/json |
| 21 | +GET /seo-banner |
26 | 22 | ```
|
27 | 23 |
|
28 |
| -| Parameter | Type | Description | |
29 |
| -| :-------- | :------- | :------------------------- | |
30 |
| -| `canonicalName` | `string` | this is the name we'll use to save our image (slugify first: Recomended!) | |
31 |
| -| `gradientColors` | `array` | an array of two colors, i.e. `[ '#ffffff', '#000000' ]`, used for our gradient | |
32 |
| -| `articleName` | `string` | the title of the article or site you want to appear in the image | |
33 |
| -| `articleCategory` | `string` | the category which that article sits in - or the subtext of the article | |
34 |
| -| `emoji` | `string` | the emoji you want to appear in the image. | |
35 |
| - |
36 |
| -**Example** |
37 |
| -```curl |
38 |
| -curl -X POST \ |
39 |
| - 'https://<base-url>/generator' \ |
40 |
| - --header 'Accept: */*' \ |
41 |
| - --header 'Content-Type: application/json' \ |
42 |
| - --data-raw '{ |
43 |
| - "canonicalName": "metaphor-website-live", |
44 |
| - "articleName": "Metaphor Website Live", |
45 |
| - "gradientColors": ["#fc00ff","#00dbde"], |
46 |
| - "articleCategory": "open-sorce", |
47 |
| - "emoji": "🎉" |
48 |
| -}' |
49 |
| -``` |
| 24 | +| Query | Type | Description | |
| 25 | +| :-------- | :------- | :-------------------------------- | |
| 26 | +| `head` | `string` | the head title legend | |
| 27 | +| `title` | `string` | the title of the article or site you want to appear in the image | |
| 28 | +| `writer` | `string` | the author legend | |
| 29 | +| `author` | `string` | the name of author | |
| 30 | +| `logo` | `string` | the logo of your app / web | |
| 31 | +| `template` | `string` | Choose one: `default`, `facebook`, `facebook-minimal`, `twitter`, `twitter-minimal`, `instagram`, `instagram-minimal`, `linkedin`, `linkedin-minimal`, `pinterest` | |
50 | 32 |
|
51 |
| -**Result**: |
| 33 | +## Sample Images |
52 | 34 |
|
53 |
| -```json |
54 |
| -{ |
55 |
| - "message": "Image generated!", |
56 |
| - "image": "data:image/png;base64,y12msd..." |
57 |
| -} |
58 |
| -``` |
| 35 | +### Default template (1342x853) |
| 36 | + |
59 | 37 |
|
60 |
| -**Sample Image**: |
61 |
| - |
| 38 | +### Facebook template (Recommended size: 1200 x 630 pixels) |
| 39 | + |
62 | 40 |
|
63 |
| -#### Classic SEO Banner |
| 41 | +### Facebook Minimal template (Minimum size: 600 x 315 pixels) |
| 42 | + |
64 | 43 |
|
65 |
| -```http |
66 |
| -GET /classic-seo-banner |
67 |
| -``` |
| 44 | +### Twitter template (Recommended size: 1200 x 675 pixels) |
| 45 | + |
68 | 46 |
|
69 |
| -| Query | Type | Description | |
70 |
| -| :-------- | :------- | :-------------------------------- | |
71 |
| -| `articleName` | `string` | the title of the article or site you want to appear in the image | |
72 |
| -| `author` | `string` | the name of author | |
73 |
| -| `language` | `string` | the category of programming language | |
| 47 | +### Twitter Minimal template (Minimum size: 600 x 335 pixels) |
| 48 | + |
74 | 49 |
|
75 |
| -Result: `image/png` |
| 50 | +### Linkedin template (Recommended size: 1200 x 675 pixels) |
| 51 | + |
76 | 52 |
|
77 |
| -**Sampe Image**: |
78 |
| - |
| 53 | +### Linkedin Minimal template (Minimum size: 600 x 400 pixels) |
| 54 | + |
79 | 55 |
|
80 |
| -#### SEO Banner (New) |
| 56 | +### Instagram template (Recommended size: 1080 x 1080 pixels) |
| 57 | + |
81 | 58 |
|
82 |
| -```http |
83 |
| -GET /seo-banner |
84 |
| -``` |
| 59 | +### Instagram Minimal template (Minimum size: 600 x 600 pixels) |
| 60 | + |
85 | 61 |
|
86 |
| -| Query | Type | Description | |
87 |
| -| :-------- | :------- | :-------------------------------- | |
88 |
| -| `title` | `string` | the title of the article or site you want to appear in the image | |
89 |
| -| `author` | `string` | the name of author | |
90 |
| -| `logo` | `string` | the logo of your app / web | |
91 |
| -| `head` | `string` | title legend | |
92 |
| -| `writer` | `string` | author legend | |
| 62 | +### Pinterest template (Recommended size: 1000 x 1500 pixels) |
| 63 | + |
| 64 | + |
| 65 | +## Help Wanted |
| 66 | +- [ ] Improve font scaling and title truncation |
| 67 | +- [ ] Improve layouts |
| 68 | +- [ ] Adding more fonts (Currently using `Inter Extrabold` and `Inter Medium`) |
| 69 | + |
| 70 | +Welcoming everyone that have passion and skill to make this app powerfull and free. |
| 71 | + |
| 72 | +## Contribute |
| 73 | + |
| 74 | +OG:IMAGE REST Generator is an open-source project, and we welcome contributions from developers and enthusiasts of all levels of experience. |
93 | 75 |
|
94 |
| -Result: `image/png` |
| 76 | +[CONTRIBUTING.md] |
95 | 77 |
|
96 |
| -**Sample Image**: |
97 |
| - |
| 78 | +## Donation / Support |
| 79 | +If you find OG:IMAGE REST Generator to be a helpful tool for your website or application, please consider supporting the project. Your donation or sponsorship can help ensure that the project continues to thrive and improve over time. You can sponsor the project directly through Github Sponsor or donate through Paypal. Your support is greatly appreciated and will help to ensure that this powerful tool remains available for free to users all over the world. Thank you for your generosity and support! |
0 commit comments