thumbor-ts
v1.3.91
Published
Typescript thumbor url builder
Downloads
117
Readme
Installation
yarn add thumbor-ts
pnpm i thumbor-ts
npm i --save thumbor-ts
Usage
import Thumbor from 'thumbor-ts';
// Your encryption key is not required, but your link will be unsafe.
const thumbor = Thumbor({
serverUrl: 'http://myserver.thumbor.com',
securityKey: 'MY_KEY'
});
// Generate your url
const thumborUrl = thumbor
.setImagePath('00223lsvrnzeaf42.png')
.resize(50, 50)
.smartCrop()
.format('webp')
.buildUrl();