diff options
| author | Marak <[email protected]> | 2021-02-11 01:24:16 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-11 01:24:16 -0500 |
| commit | 9c8b3249ffa8412d305bea0522d5754f88f000ae (patch) | |
| tree | 665bb0c281ea8a170e5c8da414aed1b80e75d86b /lib/image.js | |
| parent | 00f18703af6bf46b0435f4cc9ed1838054a79c1c (diff) | |
| parent | 388b6cd8513b3b73daab5278e539f8f6bb600e12 (diff) | |
| download | faker-9c8b3249ffa8412d305bea0522d5754f88f000ae.tar.xz faker-9c8b3249ffa8412d305bea0522d5754f88f000ae.zip | |
Merge branch 'master' into master
Diffstat (limited to 'lib/image.js')
| -rw-r--r-- | lib/image.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/image.js b/lib/image.js index 426ce78f..3f50d78f 100644 --- a/lib/image.js +++ b/lib/image.js @@ -3,6 +3,7 @@ * @namespace faker.image * @property {object} lorempixel - faker.image.lorempixel * @property {object} unsplash - faker.image.unsplash + * @property {object} unsplash - faker.image.lorempicsum * @default Default provider is unsplash image provider */ var Image = function (faker) { @@ -10,6 +11,7 @@ var Image = function (faker) { var self = this; var Lorempixel = require('./image_providers/lorempixel'); var Unsplash = require('./image_providers/unsplash'); + var LoremPicsum = require('./image_providers/lorempicsum'); /** * image @@ -47,7 +49,7 @@ var Image = function (faker) { if (typeof https !== 'undefined' && https === true) { protocol = 'https://'; } - var url = protocol + 'lorempixel.com/' + width + '/' + height; + var url = protocol + 'placeimg.com/' + width + '/' + height; if (typeof category !== 'undefined') { url += '/' + category; } @@ -218,10 +220,11 @@ var Image = function (faker) { self.lorempixel = new Lorempixel(faker); self.unsplash = new Unsplash(faker); + self.lorempicsum = new LoremPicsum(faker); // Object.assign(self, self.unsplash); // How to set default as unsplash? should be image.default? } -module["exports"] = Image;
\ No newline at end of file +module["exports"] = Image; |
