Picasso – image downloading and caching library

Published by Kapil Mohan on

Picasso allows for hassle-free image loading in your application—often in one line of code!

Link:- http://square.github.io/picasso/

<!-- permission -->
    <uses-permission android:name="android.permission.INTERNET" />
implementation 'com.squareup.picasso:picasso:2.71828'

Basic code for loading image

Picasso.get().load("http://i.imgur.com/DvpvklR.png").into(imageView);

Loading image with options

Picasso.get()
    .load(url)
    .placeholder(R.drawable.user_placeholder)
    .error(R.drawable.user_placeholder_error)
    .into(imageView);
  • error option can be used for displaying an error image, make sure the image is present in resources folder.

Library Details:-

Credits:-

contents from picasso official documentation


Kapil Mohan

Like to add color to developers life and apps. Can create smile using Android, iOS, PHP, codeignitor, web technologies, etc... Feel free to contact me at [email protected] .