Apicat Docs
  1. Dynamic values Modules
Apicat Docs
  • What is Apicat?
  • Send requests
    • Create requests
      • Request basics
      • Parameters and body
      • Request headers
      • Request settings
      • Dynamic values
      • HTTP/2
      • SOAP/WebService
    • Authentication and authorization
      • Overview
      • CA and client certificates
      • Authorization types supported by Apidog
      • Digest Auth
      • OAuth 1.0
      • OAuth 2.0
      • Hawk Authentication
      • Kerberos
      • NTLM
      • Akamai EdgeGrid
    • Response and cookies
      • Overview
      • API response in Apidog
      • Create and send cookies
      • Debug requests
    • Dynamic values Modules
      • Airline
      • Animal
      • Color
      • Commerce
      • Company
      • Database
      • Datatype
      • Date
      • Finance
      • Food
      • Git
      • Hacker
      • Helpers
      • Image
      • Internet
      • Location
      • Lorem
      • Music
      • Number
      • Person
      • Phone
      • Science
      • String
      • System
      • Vehicle
      • Word
  • Environments & variables
    • Overview
    • Using variables
    • Environments & services
  • Pre/Post processors
    • Overview
    • Assertion
    • Extract variable
    • Wait
    • Database operations
      • Overview
      • MySQL
      • MongoDB
      • Redis
      • Oracle Client
    • Using scripts
      • Overview
      • Pre processor scripts
      • Post processor scripts
      • Public scripts
      • Postman scripts reference
      • Calling other programming languages
      • Using JS libraries
      • Visualizing responses
      • Script examples
        • Assertion scripts
        • Using variables in scripts
        • Using scripts to modify request messages
        • Other examples
  • Best practices
    • How to handle API signatures
    • How to access OAuth 2.0 protected APIs
    • Apidog collaboration workflow
    • Managing authentication state in Apidog
  • Account & preferences
    • Account settings
    • Generate OpenAPI access token
    • Language settings
    • Hot keys
    • Network proxy configuration
    • Data backup
    • Updating Apidog
    • Deleting account
    • Experimental Features
  • References
    • API-Design First Approach
    • Apidog OpenAPI/Swagger Specificaiton Extensions
    • JSONPath
    • XPath
    • Regular Expressions
    • JSON Schema
    • CSV File Format
    • Install Java Environment
    • Runner deployment environment
    • Apidog flavored Markdown
  1. Dynamic values Modules

Image

Module to generate images.
Overview
For a random image, use {{$image.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 {{$image.urlLoremFlickr}} or {{$image.urlPicsumPhotos}}.
For a random placeholder image containing only solid color and text, use {{$image.urlPlaceholder}} (uses a third-party service) or {{$image.dataUri}} (returns a SVG string).
For a random user avatar image, use {{$image.avatar}}.
This module previously also contained methods for specifically themed images like "fashion" or "food", but these are now deprecated. If you need more control over image type, you can request categorized images using {{$image.urlLoremFlickr}}, use an image provider directly or provide your own set of placeholder images.

avatar#

Generates a random avatar image url.
Returns: string
Examples

avatarGitHub#

Generates a random avatar from GitHub.
Returns: string
Examples

avatarLegacy#

Generates a random avatar from https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar.
Returns: string
Examples

dataUri#

Generates a random data uri containing an URL-encoded SVG image or a Base64-encoded SVG image.
Parameters
NameTypeDefaultDescription
colorstring{{$color.rgb}}TThe color of the image. Must be a color supported by svg.
heightnumber{{$number.int(min=1,max=3999)}}The height of the image.
type'svg-uri' | 'svg-base64'{{$helpers.arrayElements(['svg-uri','svg-base64'])}}The width of the image.
widthnumber{{$number.int(min=1,max=3999)}}The width of the image.
Returns: string
Examples

url#

Generates a random image url.
Parameters
NameTypeDefaultDescription
heightnumber{{$number.int(min=1,max=3999)}}The height of the image.
widthnumber{{$number.int(min=1,max=3999)}}The width of the image.
Returns: string
Examples

urlLoremFlickr#

Generates a random image url provided via https://loremflickr.com.
Parameters
NameTypeDefaultDescription
categorystringCategory to use for the image.
heightnumber{{$number.int(min=1,max=3999)}}The height of the image.
widthnumber{{$number.int(min=1,max=3999)}}The width of the image.
Returns: string
Examples

urlPicsumPhotos#

Generates a random image url provided via https://picsum.photos.
Parameters
NameTypeDefaultDescription
blur0 | 10 | 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9{{$number.int(max=10)}}Whether the image should be blurred. 0 disables the blur.
grayscaleboolean{{$datatype.boolean}}Whether the image should be grayscale.
heightnumber{{$number.int(min=1,max=3999)}}The height of the image.
widthnumber{{$number.int(min=1,max=3999)}}The width of the image.
Returns: string
Examples

urlPlaceholder#

Generates a random image url provided via https://via.placeholder.com/.
Parameters
NameTypeDefaultDescription
backgroundColorstring{{$color.rgb(prefix=' ',format='hex')}}The background color of the image.
format'gif' | 'jpeg' | 'jpg' | 'png' | 'webp'{{$helpers.arrayElement(['gif','jpeg','jpg','png','webp'])}}The format of the image.
heightnumber{{$number.int(min=1,max=3999)}}The height of the image.
textnumber{{$color.rgb(prefix=' ',format='hex')}}The text to display on the image.
textColorstring{{$number.int(min=1,max=3999)}}TThe text color of the image.
widthnumber{{$number.int(min=1,max=3999)}}The width of the image.
Returns: string
Examples

Modified at 2025-06-25 07:57:16
Previous
Helpers
Next
Internet
Built with