You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/modules/image/index.ts
+2-106Lines changed: 2 additions & 106 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ import type { SexType } from '../person';
10
10
*
11
11
* For a random image, use [`url()`](https://fakerjs.dev/api/image.html#url). This will not return the image directly but a URL pointing to an image from one of two demo image providers "Picsum" and "LoremFlickr". You can request an image specifically from one of two providers using [`urlLoremFlickr()`](https://fakerjs.dev/api/image.html#urlloremflickr) or [`urlPicsumPhotos()`](https://fakerjs.dev/api/image.html#urlpicsumphotos).
12
12
*
13
-
* For a random placeholder image containing only solid color and text, use [`urlPlaceholder()`](https://fakerjs.dev/api/image.html#urlplaceholder) (uses a third-party service) or [`dataUri()`](https://fakerjs.dev/api/image.html#datauri) (returns a SVG string).
13
+
* For a random placeholder image containing only solid color and text, use [`dataUri()`](https://fakerjs.dev/api/image.html#datauri) (returns a SVG string).
14
14
*
15
15
* For a random user avatar image, use [`avatar()`](https://fakerjs.dev/api/image.html#avatar), or [`personPortrait()`](https://fakerjs.dev/api/image.html#personportrait) which has more control over the size and sex of the person.
16
16
*
@@ -111,7 +111,7 @@ export class ImageModule extends ModuleBase {
111
111
deprecated: 'faker.image.avatarLegacy()',
112
112
proposed: 'faker.image.avatar() or faker.image.personPortrait()',
@@ -293,110 +293,6 @@ export class ImageModule extends ModuleBase {
293
293
returnurl;
294
294
}
295
295
296
-
/**
297
-
* Generates a random image url provided via https://via.placeholder.com/.
298
-
*
299
-
* @remark This method generates a random string representing an URL from via.placeholder. Faker is not responsible for the content of the image or the service providing it.
300
-
*
301
-
* @param options Options for generating a URL for an image.
302
-
* @param options.width The width of the image. Defaults to a random number between 1 and 3500.
303
-
* @param options.height The height of the image. Defaults to a random number between 1 and 3500.
304
-
* @param options.backgroundColor The background color of the image. Defaults to a random hex color.
305
-
* @param options.textColor The text color of the image. Defaults to a random hex color.
306
-
* @param options.format The format of the image. Defaults to a random format.
307
-
* @param options.text The text to display on the image. Defaults to a random string.
0 commit comments