Code Monkey home page Code Monkey logo

fiimage's Introduction

fiimage

Resize image and create a thumbnail of a video, made with โค by Feri Irawan at 28/12/2022

Resize Image

GET /

The query strings are:

Name Description
url The Image URL
s (optional) The size will be generate. For example s=100x100

Auto Width

You can use the ? mark, like this: s=?x200. This means the width will be auto and the height will be 200px.

Example:

https://asonethumb.vercel.app?s=?x200&url=https://images.unsplash.com/photo-1518791841217-8f162f1e1131

Output:

Cat

Auto Height

Similar to auto width, you can also use the ? mark, like this: s=200x?

Example:

https://asonethumb.vercel.app?s=200x?&url=https://images.unsplash.com/photo-1518791841217-8f162f1e1131

Output:

Cat

Force width and height

You can use s=300x200, that means the width will be 300px and height will be 200px.

Example:

https://asonethumb.vercel.app?s=300x200&url=https://images.unsplash.com/photo-1518791841217-8f162f1e1131

Output:

Cat

Generate Video Thumbnail

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://asonethumb.vercel.app/?s=300x?&t=5&url=http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4

Output:

Big Buck Bunny

Create a Open Graph Image (og:image)

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://asonethumb.vercel.app/og?url=https://github.com/feri-irawan/fiimage

Output:

Open Graph Image

Using template: 1

Open Graph Image

Stay tuned for the new template :)

Contribution

If you wish to contribute to this project, please create a pull request and follow the contribution guidelines.

License

This project is licensed under the MIT license.

Thank you, and hope it proves useful. Feel free to report issues or provide suggestions.

fiimage's People

Contributors

feri-irawan avatar konyilwin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.