 
     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) {

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

        super.viewDidLoad()
        collectionView.register(InsertMediaSearchResultCollectionViewCell.self, forCellWithReuseIdentifier: InsertMediaSearchResultCollectionViewCell.identifier)
        view.wmf_addSubviewWithConstraintsToEdges(collectionView)
        additionalSafeAreaInsets = UIEdgeInsets(top: 0, left: 0, bottom: flowLayout.minimumLineSpacing, right: 0)
        collectionView.contentInset = UIEdgeInsets(top: 0, left: 12, bottom: 0, right: 12)
        apply(theme: theme)
    }

