Developer Documentation
  • Getting Started
  • Resources
    • Github
    • Discord
    • Sponsor
  • Components
    • View
    • Scroll
    • Gesture
    • Button
    • Text
    • TextInput
    • Link
    • Select
    • Spinner
    • Image
    • SVG *
    • Video *
    • VirtualListView *
    • WebView *
  • SERVICES
    • App
    • Platform
    • International
    • Accessibility
    • Clipboard
    • Storage
    • Location
    • Linking
    • Alert
    • Modal
    • Popup
    • StatusBar
    • UserInput
    • UserInterface
    • UserPresence
    • Network *
    • Navigator *
Powered by GitBook
On this page
  • Styles
  • Props

Was this helpful?

  1. Components

Image

This component displays an image, which can come from a local source or from the network. It supports JPEG, GIF and PNG formats.

Styles

  • Flexbox Styles

  • View Styles

  • Transform Styles

Props

Name

Type

Description

accessibilityLabel

string

  • Alternate text to display if the image cannot be loaded or by screen readers

headers

{[headerName: string]: string}

  • HTTP headers to include when fetching the URL

onError

(err?: Error) => void

  • Called when an error occurs that prevents the image from loading

onLoad

(size: Dimensions) => void

  • Called when the image successfully loads

resizeMethod

'auto' | 'resize' | 'scale'

  • Android-specific resize property

resizeMode

'stretch' | 'contain' | 'cover' | 'auto' | 'repeat'

  • Determines how to resize the image if its natural size does not match the size of the container

  • Note: In Web version, 'auto' doesn't scale down image if width/height smaller than the original image size

source

string

  • URL to image

style

ImageStyleRuleSet | ImageStyleRuleSet[ ]

  • See below for supported styles

testId

string

  • ID that can be used to identify the instantiated element for testing purposes

title

string

  • Tooltip for image

PreviousSpinnerNextSVG *

Last updated 5 years ago

Was this helpful?