Skip to content

Custom image loadersΒΆ

In its essence, ZoomableImage is simply an abstraction over an image loading library. If your preferred library isn't supported by telephoto out of the box, you can create your own by extending ZoomableImageSource.

fun ZoomablePicassoImage(
  model: Any?,
  contentDescription: String?,
) {
    image = ZoomableImageSource.picasso(model),
    contentDescription = contentDescription,

private fun ZoomableImageSource.Companion.picasso(
  model: Any?,
  picasso: Picasso = Picasso
): ZoomableImageSource {
  return remember(model, picasso) {
    TODO("See ZoomableImageSource.coil() or glide() for an example.")

ZoomableImageSource.picasso() will be responsible for loading images and determining whether they can be displayed as-is or should be presented in a sub-sampled image viewer to prevent OOM errors. Here are two examples: