jpeg image format not supported by picasso or glide - android

Picasso and Glide aren't supporting/loading image URL with .jpeg extension within image view.
I am working in grid view where image is being loaded in image view , either by picasso or by glide but it isn't supporting the URL with .jpeg extension.
Are there any alternates available?
Glide.with(getActivity())
.load("https://abc/profile.jpeg")
.centerCrop()
.placeholder(logo)
.into(imageView);
Picasso.get()
.load("https://abc/profile.jpeg")
.placeholder(R.drawable.logo)
.error(R.drawable.logo)
.into(imageView);

Change the extension of images to .jpg and it'll work.

Related

Picasso setting placeholder image but not the actual image

I am using the Picasso library on android to display profile images, but the image does not load for some reason and the app only displays the placeholder image.
Picasso.get()
.load(R.drawable.ic_person_black_100dp)
.placeholder(R.drawable.common_full_open_on_phone)
.into(profileImageView);
Picasso 2.X doesn't support vector drawable. You can either use Glide or use a workaround:
Glide.with(context)
.load(R.drawable.my_vector_drawable)
.into(mImageView);
When load() call fails, the error handling mechanism of Picasso seems to work with vector drawables:
Picasso.get()
.load(R.drawable.my_vector_drawable)
.error(R.drawable.my_vector_drawable)
.into(mImageView);

Loading image in android imageview

How to load images in same image view from web or local android gallery?
I have an image view which has three options for loading images templates from web service,from gallery, from camera.I am using Glide library to load images from web service, Now, if i load image from web by glide and remove that image by remove button which i have for removing a picture after i pick image from gallery it doesn't load the image from gallery instead load the same image from glide which i removed before.
write the code like this for loading image .
Glide.with(mContext).load(imgUrl)
.thumbnail(0.5f)
.crossFade()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(imageView);
Glide Library Intoduction Go through with this link, hope it will be work
You can use Picasso library. Image loading using Picasso is very easy, you can do it like this way
Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);
and in their website you can get every details.
and another Library is Glide. You can use Glide too for loading image..
You can also use Glide:
Glide.with(context).load(image).asBitmap().placeholder(R.drawable.placeholder).error(R.drawable.error).into(imageview);

Adding 4mb image from URL to imageVIew in android studio

I used picasso for loading my images from web into the imageView and it works perfectly for images less than 600 kb but anything above that returns a black imageview meaning that image is not loading. Can I take an image of 1mb or more from URL using picasso? If not, what is the best way to accomplish this.
Try Glide.
Glide.with(context).load(url).placeholder(R.drawable.placeholder).into(imageView);
OR
Glide.with (context).load (url).asBitmap().into(imageView);
u want to use picasso try this
Picasso.with(context)
.load(foodItem.getImageUrl())
.memoryPolicy(MemoryPolicy.NO_CACHE )
.networkPolicy(NetworkPolicy.NO_CACHE)
.error(R.drawable.logosign)
.noFade()
.into(holder.productImage);
compile 'com.squareup.picasso:picasso:2.5.2'

How do I display image using Bitmap and AsyncTask in Fragment?

I just want to know how to display the image from an URL by using a bitmap and an AsyncTask in a Fragment - not in an Activity.
Use the Piccaso for load image more faster
Picasso.with(context)
.load(image url here)
.resize(50, 50)
.centerCrop()
.into(imageView)
refer this link
hope this helps.

Loading Image orientation wrong

Hi I used the picasso library for load the image from server url. But some of images loading in wrong orientation. ExifInterface is class to find out the image orientation but here image is not in resource folder. I have only image url but i want to show the image in correct orientation. How I can achieve to show the image on imageview with correct view.
Picasso.with(context)
.load(url)
.resize(200, 200)
.centerCrop()
.placeholder(R.drawable.ic_pic)
.error(R.drawable.ic_pic)
.into(holder.image);

Categories

Resources