Resize image and create a thumbnail of a video, made with ❤ by Feri Irawan at 28/12/2022
GET /
The query strings are:
Name | Description |
---|---|
url |
The Image URL |
s (optional) |
The size will be generate. For example s=100x100 |
You can use the ?
mark, like this: s=?x200
. This means the width will be auto and the height will be 200px
.
Example:
https://fiimage.vercel.app?s=?x200&url=https://images.unsplash.com/photo-1518791841217-8f162f1e1131
Output:
Similar to auto width, you can also use the ?
mark, like this: s=200x?
Example:
https://fiimage.vercel.app?s=200x?&url=https://images.unsplash.com/photo-1518791841217-8f162f1e1131
Output:
You can use s=300x200
, that means the width will be 300px
and height will be 200px
.
Example:
https://fiimage.vercel.app?s=300x200&url=https://images.unsplash.com/photo-1518791841217-8f162f1e1131
Output:
GET /
The query strings are:
Name | Description |
---|---|
url |
The Video URL |
s (optional) |
The thumbnail size (similar to image resize) |
t (optional) |
The time (in seconds) of the video that will be used to generate the thumbnail |
Example:
https://fiimage.vercel.app/?s=300x?&t=5&url=http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
Output:
GET /og
The query strings are:
Name | Description |
---|---|
url |
The your web URL (must be start with https:// or http:// protocol) |
template (optional) |
The template (for now you can choose 0 or 1 ), default: 0 |
Example:
https://fiimage.vercel.app/og?url=https://github.com/feri-irawan/fiimage
Output:
Using template: 1
Stay tuned for the new template :)
If you wish to contribute to this project, please create a pull request and follow the contribution guidelines.
This project is licensed under the MIT license.
Thank you, and hope it proves useful. Feel free to report issues or provide suggestions.