- Getting Started
- The Basics
- Concepts
- SuperNative
-
EDGE Components
- Introduction
- Activity Indicator
- Badge
- Bottom Navigation
- Bottom Sheet
- Button
- Button Group
- Canvas
- Carousel
- Checkbox
- Chip
- Column
- Divider
- Gesture Area
- Icon
- Icons
- Image
- Layout & Styling
- List
- Menus
- Modal
- Pressable
- Progress Bar
- Radio Group
- Row
- Scroll View
- Select
- Shapes
- Side Navigation
- Slider
- Spacer
- Stack
- Tab Row
- Text
- Text Input
- Toggle
- Top Bar
- Virtual List
- Web View
- Plugins
- Testing
- Architecture
You're viewing pre-release documentation — version 4.x is in beta
Features, APIs and behaviour may change before the stable release. View the stable version (3.x)
Image
Overview#
Displays an image from a URL. Loaded asynchronously by the native platform — AsyncImage on iOS, Coil on Android.
Copied!
<native:image src="https://example.com/photo.jpg" :width="200" :height="150" :fit="2" :border-radius="12" />
Props#
All shared layout and style attributes are supported, plus:
src- Image URL (required, string)fit- Content fit mode (optional, int, default:1):0/1— fit (scale to fit within bounds, preserving aspect ratio)2/3— fill (scale to fill bounds, cropping excess)
tint-color- Apply a color tint as hex string (optional)alt- Accessibility alt text (optional). When set, screen readers announce the image with this label; when omitted, the image is treated as decorative and hidden from VoiceOver/TalkBack. See Accessibility
Examples#
Basic image#
Copied!
<native:image src="https://example.com/hero.jpg" class="w-full" :height="200" :fit="2" />
Rounded avatar#
Copied!
<native:image src="https://example.com/avatar.jpg" :width="64" :height="64" :fit="2" :border-radius="32"/>
Tinted icon image#
Copied!
<native:image src="https://example.com/logo.png" :width="40" :height="40" tint-color="#7C3AED"/>
Image in a card#
Copied!
<native:column class="w-full rounded-2xl" :border-width="1" border-color="#E2E8F0" bg="#FFFFFF"> <native:image src="https://example.com/cover.jpg" class="w-full" :height="180" :fit="2" /> <native:column class="p-4 gap-2"> <native:text class="text-lg font-bold">Article Title</native:text> <native:text class="text-base text-slate-500">A brief description of the article.</native:text> </native:column></native:column>
Element#
Copied!
use Native\Mobile\Edge\Elements\Image; Image::make('https://example.com/photo.jpg') ->fit(2) ->tintColor('#7C3AED');
make(string $src = '')- Create an image with a source URLfit(int $mode)-0/1= fit,2/3= filltintColor(string $hex)- Apply a color tint
Plugin Dev Kit
Build native plugins with
Claude Code
Learn More
NativePHP Ultra
All NativePHP plugins, teams & priority support from
$35/mo
Learn More
The Vibes
The unofficial Laracon US
Day 3
Grab Your Spot
Only 100 tickets!
The Masterclass
Go from zero to
published app
in no time
in no time
Learn More
Early Bird Pricing