Image Lightbox
Peter Teal
NativePHP^3.0PHP^8.2iOSanyAndroidany
Display images (jpg, jpeg, png, heic) in a full-screen native lightbox overlay above the running app UI, with pinch-to-zoom, pan, and optional action buttons.
Features
- Native full-screen modal on iOS and Android
- Pinch-to-zoom (up to 5×) and pan after zooming
- Loads local file paths and remote URLs
- WebView session cookie injection for authenticated endpoints
- Optional Edit, Markup, Share, and Delete toolbar buttons
- Native share sheet for local files and remote images
- Safe-area aware controls with dismiss animation
- Graceful error states (invalid URL, missing file, decode failure)
Installation
composer require pteal79/plugin-image-lightbox
php artisan vendor:publish --tag=nativephp-plugins-provider
php artisan native:plugin:register pteal79/plugin-image-lightbox
Usage
use Pteal79\PluginImageLightbox\Facades\ImageLightbox;
ImageLightbox::show('/path/to/image.jpg');
ImageLightbox::show('https://example.com/photo.png');
Events
EditPressed— user tapped the Edit button; includesimageIdMarkupPressed— user tapped the Markup button; includesimageIdDeletePressed— user tapped the Delete button; includesimageIdClosePressed— user dismissed the lightbox; includesimageId