Media

Media renders content like image & video.

Examples

Images with different fit properties

contain
cute doggo
fill
cute doggo

Default fallback component

Fallback Image

Custom fallback component and error handler

HTML image fallback

Override default fallback props

Fallback Image

You can check the implementation of the component for more details.

Image exports

You can import this module like so:

import {Image} from 'spaceweb/image'

It exports the following components or utility functions:

  • Image