I\'m trying to get the length of a UIImage. Not the width or height of the image, but the size of the data.
UIImage
SWIFT 4+
let imgData = image?.jpegData(compressionQuality: 1.0) debugPrint("Size of Image: \(imgData!.count) bytes")
you can use this trick to find out image size.