toloka.client.project.template_builder.view.ImageViewV1 | Source code

url: Optional[Any] = None,
full_height: Optional[Union[BaseComponent, bool]] = None,
max_width: Optional[Union[BaseComponent, float]] = None,
min_width: Optional[Union[BaseComponent, float]] = None,
no_border: Optional[Union[BaseComponent, bool]] = None,
no_lazy_load: Optional[Union[BaseComponent, bool]] = None,
popup: Optional[Union[BaseComponent, bool]] = None,
ratio: Optional[Union[BaseComponent, List[Union[BaseComponent, float]]]] = None,
rotatable: Optional[Union[BaseComponent, bool]] = None,
scrollable: Optional[Union[BaseComponent, bool]] = None,
hint: Optional[Any] = None,
label: Optional[Any] = None,
validation: Optional[BaseComponent] = None,
version: Optional[str] = '1.0.0'

Displays an image.

Parameters Description


Image link.

full_heightOptional[Union[BaseComponent, bool]]

If true, the element takes up all the vertical free space. The element is set to a minimum height of 400 pixels.

max_widthOptional[Union[BaseComponent, float]]

Maximum width of the element in pixels, must be greater than min_width.

min_widthOptional[Union[BaseComponent, float]]

Minimum width of the element in pixels. Takes priority over max_width.

no_borderOptional[Union[BaseComponent, bool]]

Controls the display of a frame around an image. By default, true (the frame is hidden). Set false to display the frame.

no_lazy_loadOptional[Union[BaseComponent, bool]]

Disables lazy loading. If true, images start loading immediately, even if they aren't in the viewport. Useful for icons. By default, false (lazy loading is enabled). In this mode, images start loading only when a Toloker scrolls to them.

popupOptional[Union[BaseComponent, bool]]

Specifies whether opening a full-size image with a click is allowed. By default, it is true (allowed).

ratioOptional[Union[BaseComponent, List[Union[BaseComponent, float]]]]

An array of two numbers that sets the relative dimensions of the sides: width (first number) to height (second number). Not valid if full_height=true.

scrollableOptional[Union[BaseComponent, bool]]

When set to true, an image has scroll bars if it doesn't fit in the parent element. If false, the image fits in the parent element and, when clicked, opens in its original size in the module window. Images in SVG format with no size specified always fit in their parent elements.


Hint text.


Label above the component.


Validation based on condition.

OverviewGetting OAuth tokenQuick start
toloka.autoquality [autoquality]