Imagepath

You will find here a description of ImagePath.

What is it?

The ImagePath allows you to define how the image will be loaded, which can be locally or remotely.

How to use it?

ImagePath.Local

It will reference a image that is on locais.JSONKotlin DSL assets. Your structure is represented by the attributes below:

AttributeTypeDefinition
urlString or BindingAbsolute or relative image path to be downloaded.
mobileIdString or BindingImage’s identifier that was previously registered on mobile platforms.

It will refer an image that it is already in the local assets.

Image(
    ImagePath.Local.both(
        "public/web-illustration.png",
        "mobileIllustration"
    )
)

ImagePath.Remote

It will reference an image that its hosted on another host or it’s related to its own server.JSONKotlin DSL. Your structure is represented by the attributes below:

AttributeTypeRequiredDefinition
urlString or BindingAbsolute or relative image path to be downloaded.
placeholderImagePath.LocalIt’s possible to pass a local asset on the app that will be shown meanwhile the remote URL is loaded.

It will refer to an image that is hosted in another host or a relative one in the own server.

Image(
  ImagePath.Remote("https://mcdn.wallpapersafari.com/medium/8/37/zlwnoM.jpg")
)

Last modified February 8, 2022: fix: imagepath docs (#839) (a86c355a)