shiny.render.image#

shiny.render.image(fn: Union[Callable[[], Optional[shiny.types.ImgData]], Callable[[], Awaitable[Optional[shiny.types.ImgData]]]]) shiny.render._render.RenderImage#
shiny.render.image(*, delete_file: bool = 'False') Callable[[Union[Callable[[], Optional[shiny.types.ImgData]], Callable[[], Awaitable[Optional[shiny.types.ImgData]]]]], shiny.render._render.RenderImage]

Reactively render a image file as an HTML image.

Parameters

delete_file (bool) – If True, the image file will be deleted after rendering.

Return type

A decorator for a function that returns an ~shiny.types.ImgData object.

Tip

This decorator should be applied before the @output decorator. Also, the name of the decorated function (or @output(id=...)) should match the id of a output_image() container (see output_image() for example usage).