compressImageToJpg

suspend fun LoadedFileBase64.compressImageToJpg(maxBytes: Long): LoadedFileBase64

Tries to compress the given file to a jpg.

The compression is done when:

  1. The file is a supported image type

  2. The file is bigger then the desired maxBytes