Skip to content

V0.0.6

Compare
Choose a tag to compare
@micheleriva micheleriva released this 17 Jan 18:34
· 19 commits to master since this release

Added

S3 URL to Imgix URL method

import Imgix from '@hackdoor/imgix'

const imgix = new Imgix('https://my-imgix-server-url.com')
const myImage = imgix
  .width(300)
  .height(500)
  .fit('crop')
  .fromS3('https://my-s3-bucket.s3.amazonaws.com/foo/bar/baz.png')

console.log(myImage)
// => "https://example.com/foo/bar/baz.png?w=500&h=600&fit=crop"

Rotation methods

Flip

A string, one of: v, h and vh

imgix.flip('v')

Orient

A number between 1 and 8 or 90, 180, 270

imgix.orient(90)

Rotation

A number between 0 and 359

imgix.rotation(180)