const faker = require('faker'); const imgUrl = faker.image.imageUrl(); //Output: https://lorempixel.com/640/480/
const faker = require('faker'); const imgUrl = faker.image.avatar(100, "red", "white", "John"); //Output: https://api.adorable.io/avatars/100/red/white/John.png
const faker = require('faker'); const imgUrl = faker.image.dataUri(400, 300, "#333"); //Output: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAADFBMVEXx8fHx8fHw8OD4+Pj19fXuThe package library used in the above examples is "faker".