Landscapist's LandscapistImage composable exposes a plugin system via the ImagePlugin sealed interface with five distinct hook points: PainterPlugin, LoadingStatePlugin, SuccessStatePlugin, FailureStatePlugin, and ComposablePlugin. Each targets a different moment in the image loading lifecycle. The post walks through how ImagePluginComponent collects plugins via a DSL using the + operator, and examines built-in implementations including PlaceholderPlugin, ShimmerPlugin, CircularRevealPlugin, PalettePlugin, and ZoomablePlugin. It also explains how to build custom plugins for analytics, branded error screens, or visual transformations, all without modifying the loader itself. The standalone landscapist-core engine enables identical behavior across Android, iOS, Desktop, and Web.

14m read timeFrom proandroiddev.com
Post cover image
Table of contents
Why LandscapistImage for pluginsThe fundamental problem: Extending image loading without modifying itIntroducing ImagePluginThe ImagePlugin sealed interfaceHow plugins are collected: ImagePluginComponentGet Jaewoong Eum ’s stories in your inboxBuilt in plugins: From simple to advancedPlaceholderPlugin : The simplest LoadingStatePluginShimmerPlugin : Adding animated loading stateCircularRevealPlugin : Transforming the painterPalettePlugin : Reacting to success with side effectsZoomablePlugin : Wrapping the entire contentPutting it all together

Sort: