 
     private func configure(_ cell: InsertMediaSearchResultCollectionViewCell, at indexPath: IndexPath) {
         let result = searchResults[indexPath.item]
-        cell.configure(imageURL: result.thumbnailURL, imageViewDimension: itemDimension, caption: result.displayTitle)
+        cell.configure(imageURL: result.thumbnailURL, imageViewDimension: flowLayout.itemSize.width, caption: result.displayTitle)
+        cell.apply(theme: theme)
     }
 
     func setImageInfo(_ imageInfo: MWKImageInfo?, for searchResult: InsertMediaSearchResult, at index: Int) {

class InsertMediaSearchResultsCollectionViewController: ViewController {
    private let flowLayout: FlowLayout
    private let collectionView: UICollectionView
    private let itemDimension: CGFloat = 100

    weak var delegate: InsertMediaSearchResultsCollectionViewControllerDelegate?


        previewingViewController.moreInformationAction = { url in
            self.present(SFSafariViewController(url: url), animated: true)
        }
        previewingViewController.apply(theme: theme)
        return previewingViewController
    }
}
