1.0.1 • Published 3 years ago

@tenryu/dummy-image v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

DummyImage

ja / en

Easily generate dummy images.

Usage

Random

import { DummyImage } from '@tenryu/dummy-image';

const imageUrl = DummyImage.getURL();

console.log(imageUrl);

image

Specifying options

import { DummyImage } from '@tenryu/dummy-image';

const imageUrl = DummyImage.getURL({
  color: 'sky-blue',
  text: 'hoge piyo',
  width: 200,
  height: 50,
});

console.log(imageUrl);

image

Option

optiondescriptiondefault
color'gray', 'sky-blue', 'pink', 'green', 'orange', 'white'random
widthwidth (px)150
heightheight (px)150
texttext in image