Package Exports
- image-proxy-yubi
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (image-proxy-yubi) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
JavaScript library for generating ImageProxy urls both on browser and server.
Installation
npm i -s image-proxy-yubi
# or
yarn add image-proxy-yubi
Usage
import ImgProxy from 'image-proxy-yubi';
const proxy = new ImgProxy({
key: process.env.IMGPROXY_KEY,
salt: process.env.IMGPROXY_SALT,
url: process.env.IMGPROXY_URL
});
const myResizedImage = proxy
.image('https://example.com/img.jpg')
.width(500)
.height(0)
.extension('png')
console.log(myResizedImage.get()); // => "Image URL Result"