@foxyimg/url-builder
v0.1.7
Published
![Foxy Image Logo](https://aspekt-media.b-cdn.net/logo.png)
Downloads
25
Readme
@foxyimg/url-builder
A typescript/javascript SDK for building Foxy Image image URLs.
Usage
Install package:
# ✨ Auto-detect
npx nypm install @foxyimg/url-builder
# npm
npm install @foxyimg/url-builder
# yarn
yarn add @foxyimg/url-builder
# pnpm
pnpm install @foxyimg/url-builder
# bun
bun install @foxyimg/url-builder
Import:
ESM (Node.js, Bun)
import {foxy} from "pkg";
CommonJS (Legacy Node.js)
const {foxy} = require("pkg");
Usage:
const {buildUrl} = foxy("https://foxy.example.com", "gweb2", "rapscallion", true);
const url = buildUrl("/path/to/image.jpg", {
sizing: {
width: 640,
height: 640,
crop: ['crop']
}
});
License
Published under the MIT license.