Questions tagged [sdwebimage]

SDWebImage is a simple image library for iOS which provides caching and an easy way to load remote images asynchronously into UIImageViews.

This library provides a category for UIImageVIew with support for remote images coming from the web.

It provides:

  • An UIImageView category adding web image and cache management to the Cocoa Touch framework
  • An asynchronous image downloader
  • An asynchronous memory + disk image caching with automatic cache expiration handling
  • A guarantee that the same URL won't be downloaded several times
  • A guarantee that bogus URLs won't be retried again and again
  • Performance

More info can be found on the github page.

885 questions
50
votes
10 answers

What happens to SDWebImage Cached Images in my app when the image file on the server changes?

I am using the SDWebImage library to cache web images in my app: https://github.com/rs/SDWebImage/blob/master/README.md Current Usage: [imageView setImageWithURL:[NSURL URLWithString:profilePictureUrl] placeholderImage:[UIImage…
gotnull
  • 26,454
  • 22
  • 137
  • 203
36
votes
5 answers

SDWebImage clearing cache

I'm displaying a list of icons downloaded from the web with text in a table view. The icons can be changed on server side and I need to replace them as soon as new icons are getting available. I try using the following code: [imgView…
Eugene
  • 10,006
  • 4
  • 37
  • 55
31
votes
5 answers

How to clear all cached images loaded from SDWebImage?

I have all images loaded on my app via SDWebImage. The downloading and caching works great, but I wanted to make a button that can clear all cached images in the entire app. I have a "Clear Cache" button as a UIButton on one of my tab bar views. How…
Miles
  • 625
  • 2
  • 9
  • 18
31
votes
18 answers

Show activity indicator in SDWebImage

I'm using SDWebView image and i want to show an Activity Indicator as placeholder, while fetching the image from remote. I tried Malek's answer here How to show an activity indicator in SDWebImage, but it seems that UIImage *cachedImage = [manager…
Phillip
  • 4,276
  • 7
  • 42
  • 74
28
votes
7 answers

How to show an activity indicator in SDWebImage

Currently i am integrating SDWebImage in my project by following below things 1)#import "UIButton+WebCache.h" 2)[button setImageWithURL:url placeholderImage:[UIImage imageNamed:@"no_photo.png"]]; So it will show the list of image present in URL …
raaz
  • 12,410
  • 22
  • 64
  • 81
28
votes
2 answers

Ambiguous use of 'sd_setImage(with:placeholderImage:completed:)' with Swift 3

I am making the following call using SDWebImage on my imageView, which works fine with Swift 2 but gives an error with XCode 8 beta 5 compiling with Swift 3: imageView.sd_setImage(with:url, placeholderImage:placeholder, completed: { (image:…
carloshwa
  • 1,254
  • 2
  • 11
  • 12
28
votes
11 answers

SDWebImage Download image and store to cache for key

Hello I am using the SDWebImage framework in a project and I want to download and cache images, but I think my code is storing an image in the cache twice? Is there any way to store the image in the cache by a key only once? Here is my code. …
AgnosticDev
  • 1,843
  • 2
  • 20
  • 36
26
votes
6 answers

iOS App Freezes on PushViewController

My navigation controller intermittently will freeze on push. It seems to add the new view controller onto the stack, but the animation never takes place. I also have two other containers that hold view controllers on the screen, and I can interact…
Maxwell
  • 6,532
  • 4
  • 37
  • 55
23
votes
6 answers

SDWebImage and setting custom HTTP headers?

I´ve just changed my code for caching images away from EGOImageCache to SDWebView. Unfortunately i don´t know how to set custom HTTP headers as i have to send authentification to be able to fetch images. It was easy done with EGOImageCache as i´ve…
rockstarberlin
  • 1,853
  • 1
  • 18
  • 31
22
votes
6 answers

How to update image in cache when image changed on server with SDWebImage

I am using SDWebImage library to download images from server. https://github.com/rs/SDWebImage SDWebImage not able update the cached image when image updated on server with the same url.
Shubham
  • 1,230
  • 2
  • 12
  • 26
16
votes
6 answers

setBackgroundimage in UIButton using SDWebimage

I want to set the UIButton background image using SDWebImage. Code :- [btn.imageView setImageWithURL:[NSURL URLWithString:@"image url here"] placeholderImage:[UIImage imageNamed:@"placeholder"]]; Thanks
Rushabh
  • 3,208
  • 5
  • 28
  • 51
15
votes
13 answers

SDWebImage : setImageWithURL fails when used to set image of a UITableViewCell

When call setImageWithURL, it fails with following, [UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x149a20 2011-12-14 18:11:38.060 [781:707] Terminating app due to uncaught exception …
Chim
  • 277
  • 1
  • 3
  • 9
15
votes
4 answers

Insert Authorization Header field with kingfisher lib

I'm using Kingfisher to show image from url, but my endpoint requires a Authorization header. How to use these kind of url with Kingfisher or SDWebImage in iOS?
sony
  • 730
  • 2
  • 9
  • 19
15
votes
3 answers

Two Categories on the same Class with the same method name

I've noticed that the AFNetworking and SDWebImage categories on UIImageView have the same method name. AFNetworking: - (void)setImageWithURL:(NSURL *)url { [self setImageWithURL:url placeholderImage:nil]; } - (void)setImageWithURL:(NSURL *)url…
PaulWoodIII
  • 2,636
  • 7
  • 31
  • 35
15
votes
2 answers

Xcode: SDWebImage clear cache for single image

I'm using SDWebImage to asynchronous image downloader with cache support. It's working perfectly except that sometimes the image got updated on the server with same name, thus I need to clear it from client device cache but no success! I found here…
DeZigny
  • 1,953
  • 4
  • 19
  • 29
1
2 3
58 59