First of all, setImageWithURL:placeholderImage: deprecated, you should also check if your string is a non-null URL. Try this approach:
NSString *imageURLString; if (imageURLString && ![imageURLString isEqual:[NSNull null]]) { NSURL *imageURL = [NSURL URLWithString:imageURLString]; [myImageView sd_setImageWithURL:imageURL placeholderImage:[UIImage imageNamed:@"placeholder.png"]]; }
Also make sure you are using the latest version of SDWebImage.
source share