Try this:
imageView.sd_setImage(with: URL(string: imgUrl), completed: { (image, error, cache, url) in let imageSize = image?.size print("imageSize", imageSize) var imgData: NSData = NSData(data: image.jpegData(compressionQuality: 1)) // var imgData: NSData = UIImagePNGRepresentation(image) // you can also replace UIImageJPEGRepresentation with UIImagePNGRepresentation. var imageSizeBytes: Int = imgData.count print("size of image in KB: %f ", Double(imageSizeBytes) / 1000.0) })