ListView with Image Loader not loading efficienty

My ListView is not scrolling smoothly. It’s like it always reloads the image from API. I want to have it scrolling smoothly.

The library that I am using to load the images is Universal Image Loader.

JAVA

String url = MainActivity.IMAGE_URL + "postid=" + model.get(position).getId();
loader.loadImage(url, new SimpleImageLoadingListener() {
    @Override
    public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
        holder.image.setVisibility(View.VISIBLE);
        holder.image.setImageBitmap(loadedImage);
    }

    @Override
    public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
        holder.image.setVisibility(View.GONE);
        holder.image.setImageBitmap(null);
    }

    @Override
    public void onLoadingCancelled(String imageUri, View view) {
        holder.image.setVisibility(View.GONE);
        holder.image.setImageBitmap(null);
    }
});

Answer

I am using this code after trying Universal ImageLoader, Picasso and Glide library, And it is fastest for me using RecyclerView.

Uri uri = Uri.fromFile(new File(path));

Picasso.with(mContext)
.load(URL_OF_IMAGE)
.error(R.drawable.blank)
.config(Bitmap.Config.RGB_565)
.resizeDimen(R.dimen.d50dp, R.dimen.d50dp)
.centerCrop()
.into(holder.imageview);

Check this owesome link that shows difference with respect to load time and memory in detail, https://inthecheesefactory.com/blog/get-to-know-glide-recommended-by-google/en