title: Why am I getting: "Cannot convert value of type '[String]?' to expected argument type 'String?'"
body: <p>Im working on an app with swift. Im loading a collection view with images from firebase. </p>
  
  <pre><code>func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
          let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "subPostCell", for: indexPath) as! SubPostCell
  
      cell.subPostImage.downloadImage(from: self.subposts[indexPath.row].pathToImage)
  
      return cell
  }
  </code></pre>
  
  <p>It gives out an error in the <code>cell.subPostImage</code> line:</p>
  
  <blockquote>
    <p>Cannot convert value of type '[String]?' to expected argument type 'String?'</p>
  </blockquote>
  
  <p>This is my subpost object:</p>
  
  <pre><code>import Foundation
  
  struct SubPost: Decodable {
      var pathToImage: [String]?
      var postID: String!
      var userID: String!
  
      init(pathToImage: [String]? = nil, postID: String? = nil, userID: String? = nil) {
          self.pathToImage = pathToImage
          self.postID = postID
          self.userID = userID
      }
  
  }
  </code></pre>
  
  <p>This is my subpostscell code:</p>
  
  <pre><code>import UIKit
  
  class SubPostCell: UICollectionViewCell {
  
      @IBOutlet weak var stepLabel: UILabel!
      @IBOutlet weak var subPostImage: UIImageView!
  
  }
  
  </code></pre>
  
  <p>What am I doing wrong?</p>