FakeMyJSON
  • FakeMyJSON - Documentation
  • Faker Formatters
    • Base
    • Lorem Ipsum Text
    • Person
    • Address
    • Phone Number
    • Company
    • Real Text
    • Date and Time
    • Internet
    • User Agent
    • Payment
    • Color
    • File
    • Image
    • Uuid
    • Barcode
    • Miscellaneous
  • Special Keys and Values
    • Special Keys
  • FakeMyJSON.io
  • Start generating random JSON!
Powered by GitBook
On this page
  • imageUrl(width, height, category)
  • image(sourceDir, width, height, category)

Was this helpful?

  1. Faker Formatters

Image

imageUrl(width, height, category)

Output Type: String

Argument

Type

Default

Valid Values

width

Integer

640

height

Integer

480

category

String

NULL

"cats", "cars", ...

{
    "imageUrl": "imageUrl"
}
{
    "imageUrl": "https://loremflickr.com/640/480/kitten?random=1"
}

image(sourceDir, width, height, category)

Output Type: String

Argument

Type

Default

Valid Values

sourceDir

String

"/tmp"

''wp-content/uploads', 'my_special_path/'

width

Integer

640

height

Integer

480

category

String

NULL

"cats", "cars", ...

{
    "image": "image"
}
{
    "image": "/tmp/1ee2c98a168ffdff737176277eac6142.jpg"
}
PreviousFileNextUuid

Last updated 4 years ago

Was this helpful?