Questions tagged [alamofireimage]

AlamofireImage is an image component library for Alamofire.

AlamofireImage is an image component library for Alamofire.

Features

  • Image Response Serializers
  • UIImage Extensions for Inflation / Scaling / Rounding / CoreImage
  • Single and Multi-Pass Image Filters
  • Auto-Purging In-Memory Image Cache
  • Prioritized Queue Order Image Downloading
  • Authentication with URLCredential
  • UIImageView Async Remote Downloads with Placeholders
  • UIImageView Filters and Transitions
  • Comprehensive Test Coverage
  • Complete Documentation

Requirements

  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 8.3+
  • Swift 3.1+

Migration Guides

Dependencies

179 questions
38
votes
7 answers

Download File Using Alamofire 4.0 (Swift 3)

In older version of Alamofire. This is how I download file let destinationPath = Alamofire.Request.suggestedDownloadDestination( directory: .documentDirectory, domain: .userDomainMask); Alamofire.download(.GET, urlString, destination:…
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135
23
votes
1 answer

Alamofire 4.0 Upload MultipartFormData Header

How do we add an authentication header to the upload function of Alamofire 4.0? below is the sample code, however I see no way in adding a header to the function. Alamofire.upload( multipartFormData: { multipartFormData in …
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135
13
votes
4 answers

Get image data with Alamofire request

I've updated my code to Swift 3 and am having trouble with the migration to Alamofire 4.0. I've used the Alamofire migration guide to successfully make most of the necessary modifications, but am still having trouble getting image data. The old…
Austin Wood
  • 368
  • 1
  • 4
  • 14
11
votes
2 answers

AlamofireImage af_setImageWithURL in a UITableViewCell without placeholder image

I'm using AlamofireImage to set an image on a UIImageView in a UITableViewCell like so: cell.imageView.af_setImageWithURL(url) The image doesn't show after downloading. It will show the image the second time when it's loaded from the memory cache.…
Jorn van Dijk
  • 1,973
  • 1
  • 15
  • 23
10
votes
10 answers

Swift 4 AlamofireImage with UITableView Cell

I am using AlamofireImages to try to download an image from a server and display it in my table view cell, this is what I got, but my images does not appear, just the textLabel and detailTextLabel override func tableView(_ tableView: UITableView,…
user979331
  • 11,039
  • 73
  • 223
  • 418
10
votes
1 answer

Using disk cached images if present in Alamofire Images

I'm using the AlamofireImage library to cache downloaded images. Code: import UIKit import AlamofireImage class ViewController: UIViewController { @IBOutlet weak var firstImageView: UIImageView! @IBOutlet weak var secondImageView:…
Javier Cadiz
  • 12,326
  • 11
  • 55
  • 76
10
votes
1 answer

AlamofireImage: Can't get image in completion block from af_setImageWithURL

all I am learning Swift and I am trying to set an image on a UIImageView using AlamofireImage. I am using the following code: self.listImageView.af_setImageWithURL( NSURL(string: list!.image!)!, placeholderImage: nil, filter:…
estemendoza
  • 3,023
  • 5
  • 31
  • 51
9
votes
1 answer

Using AlamofireImage Inside UITableViewCell

I've been reading a lot of answers here saying that by using AlamofireImage helper methods (e.g. af_setImageWithURL()) or any equivalent library, you don't need to worry about cell reusing stuff (Plus, many published tutorials actually just do…
Mamouneyya
  • 613
  • 5
  • 16
8
votes
3 answers

Upload Photo / File with JSON and custom headers via Swift 3 and Alamofire 4 | iOS | Swift

I need to call the Multipart request with Image file and JSON. I have tried this, but still getting the error. // define parameters let parameters = [ "hometown": "yalikavak", "living": "istanbul" ] Alamofire.upload(multipartFormData:…
Shoeb Siddique
  • 2,805
  • 1
  • 22
  • 42
8
votes
2 answers

AlamofireImage Disk Cache not working

I want to use AlamofireImage to download images from an url and then cache it on the device disk space. I read several posts about this and found out that AlamofireImage supports this with the help of the ImageDownloader class. The most interesting…
Philipp Otto
  • 4,061
  • 2
  • 32
  • 49
8
votes
3 answers

Resize Download Image with AlamofireImage

I have 200px x 200px UIImageView on UICollectionViewCell that will display an image from URL. The problem is I don't know what resolution's image provided by the URL and I think it's better to resize it first before placing in UIImageView due to…
Sonic Master
  • 1,238
  • 2
  • 22
  • 36
7
votes
2 answers

iOS CoreSpotlight Thumbnail Image from URL

I'm trying to build a test app that uses CoreSpotlight to make content searchable in iOS Spotlight. Currently I have it setup to whenever the user taps a refresh button it makes a server request then deleteAllSearchableItems then…
Charlie Fish
  • 18,491
  • 19
  • 86
  • 179
5
votes
6 answers

How to upload multiple images in multipart using Alamofire?

I am stuck in uploading multiple images in multipart using Alamofire. Can any one help me? Thanks in advance!! For more details, I am using this code to create body part of images data: func imageArrayToNSData(array: [UIImage],boundary:String) ->…
Nakul Sharma
  • 600
  • 1
  • 16
  • 23
5
votes
1 answer

Alamofire-image loading wrong Image inside uicollectionview cell

i have been using alamofire-image library to display image from url inside uicollectionview cell. i have noticed that most of time its displays the right image but sometimes displays wrong image(most of the time previous cell image). how to…
4
votes
1 answer

Cancel image download with AlamofireImage

we are struggling to cancel request that already sent when we use collection view cell .. ( i am not talking about cases when we want to cancel request because we already sent the same request) ... i guess we need to use the methods:…
Sosily
  • 706
  • 1
  • 10
  • 26
1
2 3
11 12