pushinbr / pam-native-image
High-performance cached native image loading for PAM Native.
Package info
github.com/push-in/pam-native-image
Type:pam-native-plugin
pkg:composer/pushinbr/pam-native-image
Requires
- php: ^8.5
- pushinbr/pam-native: ^0.8 || ^0.9 || ^0.10 || ^1.0
Requires (Dev)
- phpstan/phpstan: ^2.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
PAM Native Image
Fast images, predictable memory, native scrolling.
Load, resize, cache, cancel, and recycle remote or sandboxed images through mature native pipelines—without bundling a feed framework.
Documentation · Quick start · What you can build · PAM ecosystem · Issues
Why PAM Native Image
Load, resize, cache, cancel, and recycle remote or sandboxed images through mature native pipelines—without bundling a feed framework. The public API is strictly typed for PHP 8.5; expensive or frame-sensitive work stays in Rust or the platform SDK instead of crossing the application boundary every frame.
| Best for | A focused capability you can add to any PAM Native application |
| Native path | Coil 3 · SDWebImage |
| Application model | Composer package + generated native integration |
| Design rule | Independent module; no feed, vertical, or application template bundled |
What you can build
- Poster walls and media catalogs
- Product grids, avatars, and social timelines
- Offline-aware, memory-bounded image surfaces
Quick start
Already have a PAM Native project? Add only this capability:
pam composer require pushinbr/pam-native-image pam doctor --fix
New to PAM? Follow the five-minute PAM Native setup once, then return here. Your application stays a normal Composer project with a committed lockfile.
See it in action
return NativeImage::make('https://cdn.example.com/poster.webp') ->contentMode(ImageContentMode::Cover) ->cachePolicy(ImageCachePolicy::MemoryAndDisk) ->crossfade(120);
The decoder, resizing, cancellation, memory/disk caching, and recycled-view safety stay native through Coil 3.3 on Android and SDWebImage 5.21 on iOS. It is a horizontal primitive and never installs a feed or application template.
Sources must be HTTPS or sandbox-relative. Always provide semantic image descriptions in the surrounding PAM UI surface, test low-memory eviction and offline behavior, and run pam production certify before release.