4

I am using SdWebImage for displaying images in ImageView If I use image URL directly like http://52.74.11.56/photos/2015/07/1438154558488.jpg , SDWebImage is working perfect.

But I need to use Thumbor as thumbnail service. But by using thumbor URL like below

        str_thumb_URL0 =@"http://thumb.dot-share.com/unsafe/1024x556/smart/http://52.74.11.56/photos/2015/07/1438154558488.jpg";
        [cell.imageView sd_setImageWithURL:[NSURL URLWithString:str_thumb_URL0]
                          placeholderImage:[UIImage imageNamed:@"placeholder.png"]
                                 completed:^(UIImage image, NSError error, SDImageCacheType cacheType, NSURL *imageURL) {                                    
                                     NSLog(@"%@",error);
                                 }];

Xcode generate this error

"Error Domain=SDWebImageErrorDomain Code=0 "Downloaded image has 0 pixels" UserInfo=0x7f8e35477360 {NSLocalizedDescription=Downloaded image has 0 pixels}"

Note: Thumbor URL above is working in most of other WebImage libraries except SdWebImage

Please help me out of this problem

COil
  • 7,201
  • 2
  • 50
  • 98
Akhzar Nazir
  • 101
  • 1
  • 6

1 Answers1

0

The issue is with server hostname of image URL.

The solution is:-

You can fix this with a simple command:

echo "127.0.0.1 $HOSTNAME" | sudo tee -a /etc/hosts

Nilesh R Patel
  • 697
  • 7
  • 17