coding-lemur / ThumborUrlBuilderTs

Thumbor TypeScript client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ThumborUrlBuilder TS

TypeScript client for building Thumbor URLs.

Usage

# Install thumbor-url-builder-ts module

npm install thumbor-url-builder-ts --save
import { ThumborUrlBuilder } from 'thumbor-url-builder-ts';

// Your encryption key is not required, but your link will be unsafe.
const thumbor = new ThumborUrlBuilder('MY_KEY', 'http://myserver.thumbor.com');

// Generate your url
const thumborUrl = thumbor
    .setImagePath('00223lsvrnzeaf42.png')
    .resize(50, 50)
    .smartCrop(true)
    .buildUrl();

About

Thumbor TypeScript client


Languages

Language:TypeScript 100.0%