-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glide won't load certain images #2132
Comments
I was just working on integrating this library into my in-development app for a website, and it appears I'm having the same issues as well, using 4.0.0 RC1. Link to image: https://www.pokecommunity.com/customavatars/avatar150187_74.gif logcat:
Code being used to load the image: ImageView iv = (ImageView) headerLayout.findViewById(R.id.imageViewAvatar);
RequestOptions ro = new RequestOptions()
.fitCenter()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.placeholder(R.drawable.icon_color3)
.override(256, 140)
.fitCenter();
if (!sharedPrefs.getString("myAvatarURL", "").equals("")) {
//we have an avatar revision, use a url stringbuilder to get the avatar, download it, and set it to the drawer icon.
String imageURL = sharedPrefs.getString("myAvatarURL", "");
Glide.with(getApplicationContext()).asGif().load(imageURL).apply(ro).into(iv);
}
else
{
Glide.with(getApplicationContext()).load(R.drawable.icon_color3).apply(ro).into(iv); //default load the PC icon as the user's avatar.
} |
For https://od.lk/s/119127432_OQkeb/tumblr_of4zhq2tW71r2qr2so1_500.jpg this occurs because we're passing in an Accept-Encoding header of 'identity' and getting back an encoding of 'deflate'. I think that's a bug in the backend serving that url. It's probably something we can handle locally as well. The Android documentation for HttpUrlConnection seems incorrect in that if we don't pass in that header (on API 25 at least), we still get back valid content lengths: https://developer.android.com/reference/java/net/HttpURLConnection.html. |
I hate replying to a closed issue, but I tried the 20170714 snapshot to see if this issue would be rectified, however, I'm still getting the same errors. In addition, using Picasso's into function, the same image URL works perfectly fine in the ImageView. |
@Incineroar Can you open a new issue with whatever urls and errors you're seeing? |
@sjudd ,@Incineroar , @azurh |
@geniushkg yes ,"but was resolved when i removed asGif()." i find this. |
Glide Version: 4.0.0-RC1 (also tried 3.7.0 and 3.8.0)
Integration libraries: No
Device/Android Version: Nexus 5 (6.0.1), Galaxy S5 (6.0.1), Galaxy S4 (5.0.1) and other Galaxy phones.
Issue details / Repro steps / Use case background:
Glide load line /
GlideModule
(if any) / list Adapter code (if any):However, this image
(https://od.lk/s/121195309_xa4Rd/Cover.jpg)
works perfectly in Picasso with this one-liner:So I think that this is a Glide issue.
Here are some other image files which Glide fails to load:
Layout XML:
Stack trace / LogCat:
The text was updated successfully, but these errors were encountered: