Skip to content

๐Ÿž Simple javascript util for Akamai image converter

License

Notifications You must be signed in to change notification settings

mazipan/akamai-image-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿž akamai-image-converter

Simple javascript util for Akamai image converter

License minified version downloads Travis codecov

About Akamai Image Converter

https://tech.akamai.com/image_converter/

Download & Usage

Download via NPM/YARN

npm i akamai-image-converter
// OR
yarn add akamai-image-converter

Basic Usage

import imageConverter from 'akamai-image-converter'

// call convert methods will return optimized url
imageConverter.convert(TEST_IMAGE, format, quality, width, height)

// let say we have url: //tech.akamai.com/image-manager/img/mountain.jpeg
// this method will return url :
// //tech.akamai.com/image-manager/img/mountain.jpeg?resize=${width}px:${height}px&output-quality=${quality}&output-format=${format}

Advance Usage

You can define your combination by your self

import imageConverter from 'akamai-image-converter'

// you can call these available function
let result = imageConverter._withOutputFormat(TEST_IMAGE, format)
let result = imageConverter._withQuality(TEST_IMAGE, quality)
let result = imageConverter._withDimension(TEST_IMAGE, width, height)

Copyright ยฉ 2018 by Irfan Maulana

Releases

No releases published

Packages

No packages published