Giter VIP home page Giter VIP logo

thumbor-heroku's Introduction

Thumbor on heroku

thumbor 是一個動態縮圖服務, 也是小海嚴選背後採用的縮圖機制。

簡單來說, 可以及即時直接讀取原圖然後輸出你要的縮圖, 可以自定大小。

你可能會想說這效能到底行不行阿? 其實你前面擋個 CDN 就好了, 小海嚴選就是這麼做的, 1 heroku dyno + cloudflare. Perfect!

OK, 這個 repo 就是為了簡化所有流程而做的, 你只需要遵照以下幾個步驟, 就可以在五分鐘內開始擁有你自己的動態縮圖服務。

安裝流程

$ git clone https://github.com/tzangms/thumbor-heroku.git
$ heroku create
$ git push heroku master

等它安裝完, 接著就可以打開屬於你自己的 thumbor

$ heroku open

接著然後輸入你要的縮圖圖片網址, 便可以動態產生縮圖, 這裡以寬高 300x300 為例子。

http://<your-herokuapp.com>/unsafe/300x300/media.curator.im/images/164483516927300/556890257686622_945544_556890257686622_1062581386_n.jpg

這裡便是我要的 300x300 的縮圖

沒錯, 不到五分鐘! 要是超過 5 分鐘, 一定是你網路太慢, 或是 heroku 太慢, 絕對不是我的問題

更多詳細功能請見 thumbor

thumbor-heroku's People

Contributors

tzangms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.