https://github.com/paulogr/api-opengraph-image
https://github.com/paulogr/api-opengraph-image
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/paulogr/api-opengraph-image
- Owner: paulogr
- Created: 2022-02-17T23:26:12.000Z (about 3 years ago)
- Default Branch: v1
- Last Pushed: 2022-02-17T23:26:54.000Z (about 3 years ago)
- Last Synced: 2024-12-26T05:23:52.670Z (4 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Open Graph Image API
A runtime service to return optimized Open Graph images from a URL. Works with:
1. ``
1. ``
1. ``
1. ``## Usage
URLs have the formats:
```
/:url/
/:url/:size/
/:url/:size/:format/
```* `url` must be URI encoded.
* `size` (optional) can be `small` (375×_), `medium` (650×_), or `auto` (keep original width)
* `format` must by an output image format supported by [Eleventy Image](https://www.11ty.dev/docs/plugins/image/)## Deploy your own
## Demos
### Advanced: Manual Cache Busting
If the images aren’t updating at a high enough frequency you can pass in your own cache busting key using an underscore prefix `_` after your URL.
This can be any arbitrary string tied to your unique build, here’s an example that uses today’s date.
```
/:url/_20210802/
/:url/:size/_20210802/
/:url/:size/:format/_20210802/
```