SDWebImage 3.8.0 get wrong image

Created on 7 Jun 2016  Â·  10Comments  Â·  Source: SDWebImage/SDWebImage

I did just update SDWebImage 3.7.6 to 3.8.0
suddenly ImageView showing wrong image.

I think request url has "?" character or something.

in my case.

i did request seperate url. but SDImageCacheType was SDImageCacheTypeMemory. it just first request. but return already cached image.

2016-06-07 16:39:33.651 KakaoStyle[23909:1853770] __61-[STHotViewController collectionView:cellForItemAtIndexPath:]_block_invoke[477]- request URL http://img1.daumcdn.net/thumb/[email protected]/?fname=http://t1.daumcdn.net/kstyle/upload/shopbox/2016/06/81/74/16/0/16748125.jpg 2016-06-07 16:39:33.651 KakaoStyle[23909:1853770] __61-[STHotViewController collectionView:cellForItemAtIndexPath:]_block_invoke[478]- cacheType - 2 2016-06-07 16:39:33.651 KakaoStyle[23909:1853770] +[NSURL(ST) thumbnailURLWithString:withSize:][55]- http://img1.daumcdn.net/thumb/[email protected]/?fname=http://t1.daumcdn.net/kstyle/upload/shopbox/2016/05/91/72/16/0/16729154.jpg 2016-06-07 16:39:33.651 KakaoStyle[23909:1853770] __61-[STHotViewController collectionView:cellForItemAtIndexPath:]_block_invoke[477]- request URL http://img1.daumcdn.net/thumb/[email protected]/?fname=http://t1.daumcdn.net/kstyle/upload/shopbox/2016/05/91/72/16/0/16729154.jpg 2016-06-07 16:39:33.651 KakaoStyle[23909:1853770] __61-[STHotViewController collectionView:cellForItemAtIndexPath:]_block_invoke[478]- cacheType - 2

2016-06-07 4 20 47

i just remove prefix url contain ? charcter.

2016-06-07 16:38:44.333 KakaoStyle[23867:1849887] __61-[STHotViewController collectionView:cellForItemAtIndexPath:]_block_invoke[477]- request URL http://t1.daumcdn.net/kstyle/upload/shopbox/2016/05/36/62/16/0/16623667.jpg 2016-06-07 16:38:44.334 KakaoStyle[23867:1849887] __61-[STHotViewController collectionView:cellForItemAtIndexPath:]_block_invoke[478]- cacheType - 0 2016-06-07 16:38:44.341 KakaoStyle[23867:1849887] __61-[STHotViewController collectionView:cellForItemAtIndexPath:]_block_invoke[477]- request URL http://t1.daumcdn.net/kstyle/upload/shopbox/2016/06/80/73/16/0/16738085.jpg 2016-06-07 16:38:44.342 KakaoStyle[23867:1849887] __61-[STHotViewController collectionView:cellForItemAtIndexPath:]_block_invoke[478]- cacheType - 0

2016-06-07 4 42 56

it has loaded image perfectly.

any idea? thank you.

bug

All 10 comments

@myriky in 3.8.0 we fixed #1433 with fb0cdb6, 1bf62d4 and #1584. Basically the key created from the image URL no longer contains the query params. In your case, the key for this url
http://img1.daumcdn.net/thumb/[email protected]/?fname=http://t1.daumcdn.net/kstyle/upload/shopbox/2016/06/81/74/16/0/16748125.jpg is http://img1.daumcdn.net/thumb/[email protected]/. That's because of the way the urls are created on this server.

I'm not sure if this is an isolated issue or we just created problems for a lot of users. I wonder how many urls are like this, because in my whole experience, I never got images with query params.

Is this a known issue in the readme? I think it may catch many people unaware.

Sent from my iPhone

On 7 Jun 2016, at 09:28, Bogdan Poplauschi [email protected] wrote:

@myriky in 3.8.0 we fixed #1433 with fb0cdb6, 1bf62d4 and #1584. Basically the key created from the image URL no longer contains the query params. In your ca se, the key for this url
http://img1.daumcdn.net/thumb/[email protected]/?fname=http://t1.daumcdn.net/kstyle/upload/shopbox/2016/06/81/74/16/0/16748125.jpg is http://img1.daumcdn.net/thumb/[email protected]/. That's because of the way the urls are created on this server.

I'm not sure if this is an isolated issue or we just created problems for a lot of users. I wonder how many urls are like this, because in my whole experience, I never got images with query params.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

It's been added in the Changelog and the Release notes

Apologies then, I guess I overlooked that Bogdan.

Sent from my iPhone

On 7 Jun 2016, at 09:40, Bogdan Poplauschi [email protected] wrote:

It's been added in the Changelog and the Release notes

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

No problem :)

I've decided to revert to the old behavior. People with problems with the way we compute the key by default can use SDWebImageManager cacheKeyFilter to override that mechanism.

Fixed by de149ae

@myriky I just released a 3.8.1 patch version that reverts to the old way of computing the keys. Can you upgrade and let me know if it fixes the issue?

@bpoplauschi It works good at 3.8.1. Thank you :)

Great

Was this page helpful?
0 / 5 - 0 ratings