项目作者: lukluk

项目描述 :
Real-time image processing and image CDN
高级语言: JavaScript
项目地址: git://github.com/lukluk/image-server-onfly.git
创建时间: 2017-03-03T19:39:47Z
项目社区:https://github.com/lukluk/image-server-onfly

开源协议:

下载


image-server-onfly

Real-time image processing and image CDN

Example

https://DOMAIN/SOURCENAME/PATH?q=QUALITY&w=WIDTH&h=HEIGHT&MORE..

w and h keep aspect ratio, you can just define w or h

  1. https://imgix.livaza.xyz/backend/Bazaar%20Sofa_2017.jpg?q=60&w=500

alt tag

MORE AVAILABLE QUERY

  1. trim: optional. default: false. trims edges that are the background color.
  2. trimFuzz: optional. [0-1) float, default 0. trimmed color distance to edge color, 0 is exact.
  3. density optional. Integer dpi value to convert
  4. resizeStyle: optional. default: 'aspectfill'. can be 'aspectfit', 'fill'
  5. aspectfill: keep aspect ratio, get the exact provided size.
  6. aspectfit: keep aspect ratio, get maximum image that fits inside provided size
  7. fill: forget aspect ratio, get the exact provided size
  8. gravity: optional. default: 'Center'. used to position the crop area when resizeStyle is 'aspectfill'
  9. can be 'NorthWest', 'North', 'NorthEast', 'West',
  10. 'Center', 'East', 'SouthWest', 'South', 'SouthEast', 'None'
  11. format: optional. output format, ex: 'JPEG'. see below for candidates
  12. filter: optional. resize filter. ex: 'Lagrange', 'Lanczos'. see below for candidates
  13. blur: optional. ex: 0.8
  14. strip: optional. default: false. strips comments out from image.
  15. rotate: optional. degrees.
  16. flip: optional. vertical flip, true or false.

Config

SOURCE

  1. LINE 25 - 29
  2. paths['catalog']='https://static.livaza.com/magemedia'
  3. paths['product']='https://static.livaza.com/product'
  4. paths['v2assets']='https://10.130.46.33/assets'
  5. paths['backend']='http://10.130.40.28/image'