media

Type:
<string> | <string[]>

Default: [ 'image', 'logo' ]
Values:
'audio' | 'iframe''image' | 'logo' | 'screenshot' | 'video'
Determines the field to use as the media of the card.
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://www.ted.com/talks/jia_jiang_what_i_learned_from_100_days_of_rejection'
    media={['image', 'logo']}
  />
)
The default value is a collection of fields, meaning that the first valid value will be used as the image of the card.
However, you can pass a single value to be used instead, for example 'logo'
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://www.ted.com/talks/jia_jiang_what_i_learned_from_100_days_of_rejection'
    media='logo'
  />
)
The detection of 'video' is also supported
import Microlink from '@microlink/react'

export default () => (
  <Microlink url='https://www.instagram.com/p/BeV6tOhFUor/' media='video' />
)
And 'audio' too!
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://open.spotify.com/track/1W2919zs8SBCLTrOB1ftQT?si=4PcqgjH5RlWCvB5q4ukdnw'
    media='audio'
  />
)

media

Type:
<string> | <string[]>

Default: [ 'image', 'logo' ]
Values:
'audio' | 'iframe''image' | 'logo' | 'screenshot' | 'video'
Determines the field to use as the media of the card.
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://www.ted.com/talks/jia_jiang_what_i_learned_from_100_days_of_rejection'
    media={['image', 'logo']}
  />
)
The default value is a collection of fields, meaning that the first valid value will be used as the image of the card.
However, you can pass a single value to be used instead, for example 'logo'
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://www.ted.com/talks/jia_jiang_what_i_learned_from_100_days_of_rejection'
    media='logo'
  />
)
The detection of 'video' is also supported
import Microlink from '@microlink/react'

export default () => (
  <Microlink url='https://www.instagram.com/p/BeV6tOhFUor/' media='video' />
)
And 'audio' too!
import Microlink from '@microlink/react'

export default () => (
  <Microlink
    url='https://open.spotify.com/track/1W2919zs8SBCLTrOB1ftQT?si=4PcqgjH5RlWCvB5q4ukdnw'
    media='audio'
  />
)