Picasso is one of the most popular library for android. It is very simple and powerful library for image downloading and caching. Picasso is an open source media management framework for Android that wraps media decoding, memory and disk caching, and resource pooling into a simple and easy to use interface. Picasso supports fetching, decoding, and displaying images. Picasso includes a flexible API that allows developers to plug in to almost any network stack. Picasso’s primary focus is on making scrolling any kind of a list of images as smooth and fast as possible, but Picasso is also effective for almost any case where you need to fetch, resize, and display a remote image.

First Add Dependency: –

compile 'com.squareup.picasso:picasso:2.5.2'

JavaFile:- MainActivity.java

package jeevan.karan.pecaso;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;
import jeevan.karan.R;
import com.squareup.picasso.Picasso;
public class Pecaso extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ImageView imageView = (ImageView) findViewById(R.id.imageview);
Picasso.with(this)
.load("https://cms-assets.tutsplus.com/uploads/users/21/posts/19431/featured_image/CodeFeature.jpg")
.into(imageView);
}
}

XML file activity_main.xml:-

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
tools:context="com.example.safal.sahilapp.pecaso.Pecaso">

<ImageView
android:id="@+id/imageview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/cat" />
</RelativeLayout>