使用拇指或第三方调整图像大小时,ios SdWebImage图像不会显示

使用拇指或第三方调整图像大小时,ios SdWebImage图像不会显示,ios,iphone,resize,sdwebimage,thumbor,Ios,Iphone,Resize,Sdwebimage,Thumbor,我使用的是在ImageView中显示图像,如果我直接使用图像URL,就像,SDWebImage是完美的 但我需要使用缩略图服务。但通过使用拇指或URL,如下所示 str_thumb_URL0 =@"http://thumb.dot-share.com/unsafe/1024x556/smart/http://52.74.11.56/photos/2015/07/1438154558488.jpg"; [cell.imageView sd_setImageWithU

我使用的是在ImageView中显示图像,如果我直接使用图像URL,就像,SDWebImage是完美的

但我需要使用缩略图服务。但通过使用拇指或URL,如下所示

        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生成此错误

“错误域=SDWebImageErrorDomain代码=0”下载的映像具有0 像素“UserInfo=0x7f8e35477360{NSLocalizedDescription=下载 图像有0个像素}”

注意:上面的thumb或URL在除


请帮助我解决此问题

问题在于图像URL的服务器主机名

解决方案是:-

您可以通过一个简单的命令解决此问题:

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