ResizeImageSwift Loop to resize image with file size You can resize like this img.image?.resizeUnder(0.1) // Resize until file size is under 0.1 MB