https://github.com/mazipan/akamai-image-converter
🏞 Simple javascript util for Akamai image converter
https://github.com/mazipan/akamai-image-converter
akamai-image-converter image-compression image-converter image-optimization
Last synced: 8 months ago
JSON representation
🏞 Simple javascript util for Akamai image converter
- Host: GitHub
- URL: https://github.com/mazipan/akamai-image-converter
- Owner: mazipan
- License: mit
- Created: 2018-04-19T02:43:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-29T04:07:41.000Z (over 6 years ago)
- Last Synced: 2025-02-01T01:32:27.354Z (8 months ago)
- Topics: akamai-image-converter, image-compression, image-converter, image-optimization
- Language: JavaScript
- Size: 14.6 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🏞 akamai-image-converter
> Simple javascript util for Akamai image converter
[](https://github.com/mazipan/akamai-image-converter)  [](https://www.npmjs.com/package/akamai-image-converter)
[](https://www.npmjs.com/package/akamai-image-converter) [](https://travis-ci.org/mazipan/akamai-image-converter)
[](https://codecov.io/gh/mazipan/akamai-image-converter)## About Akamai Image Converter
https://tech.akamai.com/image_converter/
## Download & Usage
### Download via NPM/YARN
```js
npm i akamai-image-converter
// OR
yarn add akamai-image-converter
```### Basic Usage
```js
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
```js
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](https://github.com/mazipan/)