📐
Thunkable Docs
Build an AppDrag and Drop DocsSnap to Place Docs
Snap to Place
Snap to Place
  • 👋Welcome to Thunkable Docs
  • 👶Getting Started
    • Signing In
    • Your Thunkable Projects Page
    • Tutorials
    • Live Test your App
  • 🆕Create New Project
    • Project Settings
    • Project Assets and Sizes
  • Thunkable Sample Projects
  • Public Gallery of Projects
  • 🛠️ Components
  • 🔘User Interface
  • Button
  • Label
  • Text Input
  • List Viewer
  • Web Viewer
  • Switch
  • Slider
  • Alert
  • Loading Icon
  • Date Input
  • Time Input
  • PDF Reader
  • Rating
  • 📊Data Viewers
  • Data Viewer List
  • Data Viewer Grid
  • Custom Data Viewer Layout
  • Data Sources
  • 📐Layout
  • Top Tab Navigator
  • Bottom Tab Navigator
  • Stack Navigator
  • Drawer Navigator
  • Screen
  • Row
  • Column
  • 📷 Image
  • Image
  • Photo Library
  • Camera
  • Barcode Scanner
  • Image Recognizer
  • Animation by Lottie
  • Video
  • Video Recorder
  • 🗄️ Data
  • Local Storage
  • Local DB
  • Realtime DB by Firebase
  • Airtable
  • Media DB by Cloudinary
  • File Picker
  • Web API
  • 🌍Location
  • Maps by Google and Apple
  • Location Sensor
  • 💲Monetization
  • Ads by AdMob
  • In-App Purchase
  • 🌐Sensors
  • Gyroscope
  • Magnetometer
  • Accelerometer
  • Timer
  • Bluetooth Low Energy
  • 🔊Voice
  • Sound
  • Text to Speech
  • Speech Recognizer
  • Translator
  • Audio Recorder
  • 🤝Social
  • Share
  • Email Sign In by Firebase
  • Push Notifications by One Signal
  • 🎮Gaming
  • Canvas
  • Sprites
  • Sprite Gallery
  • Canvas Label
  • 🤖Gaming Blocks🎮
  • Events
  • Motion
  • Looks
  • Direction
  • Sensing
  • Add & Remove
  • Stage
  • Canvas Label
  • 🤖Blocks
  • Control
  • Logic
  • Math
  • Text
  • Lists
  • Color
  • Objects
  • Device
  • Variables
  • Functions
  • "Any Component" Blocks
  • 🖥️ App Services & Emulators
  • 🔒App Data Privacy
  • ➕Make Copy
  • 📥Download
  • 📤Share
  • 📱Publish
  • Publish to App Store (iOS)
    • TestFlight Overview
      • TestFlight in Depth
  • Publish to Play Store (Android) with AAB
  • Publish as a Web App
  • Generate Screenshots
  • 🔎Troubleshooting
    • Login Issues
    • FAQs
  • 📏Intro to Spacing
  • 🖼️ Intro to Sizing
  • 🔤Fonts
  • 💾Managing Storage
  • 📝Bugs and Product Feedback
  • Snap to Place Hour of Code Videos
Powered by GitBook
On this page
  • Image Overview
  • Set Image
  • Edit Image size
  • Resizing the Image
  • Style the Image
  • Add spacing
  • Events
  • Click
  • Properties
  • Computed Dimensions
  • Height
  • Picture
  • Resize Mode
  • Visible
  • Width

Was this helpful?

Export as PDF

Image

The image component lets you display pictures in your app.

Previous ImageNextPhoto Library

Last updated 2 years ago

Was this helpful?

Image Overview

The Image component lets you display pictures in your app and pairs nicely with image based components like the , , and

Set Image

There are a few ways you can display an image in your app:

  1. Take a picture with the Camera component

The blocks above open up your phone’s camera and set the Image component to the picture that you took.

Edit Image size

You can set how tall the Image is using the height property and set how wide it is using the width property.

Height

  • Fill container - The Image fills the entire screen vertically

  • Fit contents - The Image’s height changes to fit the contents it contains

  • Relative size - The Image fills the specified percentage of the screen

  • Absolute size - Sizes the Image to a specified number of pixels

Width

  • Fill container - The Image fills the entire screen horizontally

  • Fit contents - The Image’s width changes to fit the contents it contains

  • Relative size - The Image fills the specified percentage of the screen

  • Absolute - Sizes the Image to a specified number of pixels

Resizing the Image

With the Resize Mode property, you can do the following:

  • Cover: Resizes the picture to its max height or width regardless without changing the image quality.

  • Contain: Resizes the picture to fit the area without changing its quality

  • Stretch: The picture’s height will change to fill the image component length-wise

  • Repeat: Repeats the picture at its original quality within the image component area

  • Center: Positions the picture in the middle of the image component

Style the Image

You can style the image with the following properties:

  • Border

    • Width: Enter how wide you want the border outline of the image to be

    • Color: Pick a color for the border of the image

    • Radius: Enter how round you want the edges of the border for the image to be

Add spacing

You can change the spacing and positioning of the Image with the Margin and Padding properties.

Margin

  • You can specify how much space you want between the edges of the image and the screen using either pixel or percent values.

Padding

  • You can specify how much space you want between the border and the contents of the image using either pixel or percent value.

Events

Click

This event handler is fired when the user clicks on the image.

Properties

Computed Dimensions

The Computed Height and Computed Width blocks return the on screen dimensions of the image, after it has been rendered on-screen. The value returned is an integer, representing the size of the image in pixels.

Height

The set and get height blocks work with the Height property of the image component. Acceptable input values are.

  • Number of Pixels

  • Percentage Height

  • "Fit Contents"

  • "Fill Container"

Picture

The set and get picture blocks work with picture property of the image component. Pictures can be uploaded as local assets or specified as URLs

Resize Mode

The set and get resize mode blocks work with how the picture is scaled within the image component. Acceptable values are:

  • Cover

  • Contain

  • Stretch

  • Repeat

  • Center

Visible

The set and get visible blocks are used to show or hide the entire image component. Acceptable values are:

  • True

  • False

Width

The set and get width blocks work with the Width property of the image component. Acceptable values are.‌

  • Number of Pixels

  • Percentage Width

  • "Fit Contents"

  • "Fill Container"

Upload a picture to your project Files:

Provide a link in the Image properties

Camera
Photo Library
Image Recognizer
Media DB