Skip to content
A Node client library to generate urls for imgproxy services.
Branch: master
Clone or download
Latest commit b34198f Apr 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.prettierrc
LICENSE.md
README.md
package-lock.json
package.json 0.0.4 Apr 15, 2019
tsconfig.json replace options class with builder to simplify api (#2) Apr 15, 2019
tslint.json

README.md

imgproxy

A Node client library to generate urls for imgproxy services.

Usage

import Imgproxy, { Gravity } from 'imgproxy';

const imgproxy = new Imgproxy({
  baseUrl: 'https://imgproxy.example.com',
  key: process.env.IMGPROXY_KEY,
  salt: process.env.IMGPROXY_SALT,
  encode: true,
});

imgproxy
  .builder()
  .resize('fill', 300, 200, 0)
  .gravity(Gravity.north_east)
  .dpr(2)
  .generateUrl('https://example.com/path/to/image.jpg');

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

This project is licensed under the MIT License.

You can’t perform that action at this time.