Image#
- marimo.image(src: str | BytesIO, alt: str | None = None, width: int | None = None, height: int | None = None, rounded: bool = False, style: dict[str, Any] | None = None) Html #
Render an image as HTML.
Example.
mo.image( src="https://marimo.io/logo.png", alt="Marimo logo", width=100, height=100, rounded=True, ) with open("logo.png", "rb") as file: mo.image(src=file)
Args.
src
: the URL of the image or a file-like objectalt
: the alt text of the imagewidth
: the width of the image in pixelsheight
: the height of the image in pixelsrounded
: whether to round the corners of the imagestyle
: a dictionary of CSS styles to apply to the image
Returns.
Html
object