I try to pass my image from the tableViewCell to the detailVC if the cell get tapped, but the imageView on the detailVC is empty where normally the image from the cell should be... My current code works for textLabels as an example, but somehow not for the image
Opinionated Solution
The code here suggests that you are using Firebase. Retrieving images from Firebase requires:
Regardless, you should not send the actual image to the detailVC in my opinion. Try instead to send the download URL and attempt to download the image in detailVC, or to pull it from cache if you are caching. The reason for this is, imagine if the user clicks on a cell when the image has not finished downloading (he/she may know from other cell details that this is the cell of interest), would you wait for the image to download before displaying the detailVC? That seems contrary to what a user would expect. So it may just be better to handle the downloadURL instead of the whole image.
Just throwing this out there in case: Make sure that when you finish downloading your image you call the main thread to update the UIImage. Read about it here for reference.