image-angel
v1.0.2
Published
This package is a server-side SDK for using the Image Angel watermarking service. For more information on Image Angel and to obtain an API key, see http://imageangel.co.uk
Downloads
179
Readme
Image Angel Client SDK
This package is a server-side SDK for using the Image Angel watermarking service. For more information on Image Angel and to obtain an API key, see http://imageangel.co.uk
Installation
npm install image-angel
Usage
Setup:
import { Client } from 'image-angel';
const client = new Client('my-key-name', API_KEY);
To create an ImageAngel URL which can be given to users:
const urlString = await client.makeUrl(
'https://my.files/secret.jpeg', // Source URL
'filename.jpeg', // Filename to show the user
5678, // Watermark to embed, e.g. transaction id
'OtherInfo' // Auxiliary information to include in URL
);
When accessed, this URL will serve a version of the image with the watermark. The link to the non-watermarked image is encrypted in the URL, allowing ImageAngel to download the image when the URL is requested by the client. ImageAngel URLs are crytographically tamper-evident - changing the watermark id or auxiliary information will result in the URL being rejected by ImageAngel when it is used.
License
This package is distributed under the Apache License, Version 2.0, see LICENSE for more information.