Convert jpeg image to Data in JavaScript

  image, image-compression, javascript, web

I’me saving images on a server after converting them with jpegData(compressionQuality: 03) in Swift on my iOS Client:

image.jpegData(compressionQuality: 0.3)

In order to create a compatible web version, I will need to achieve the same functionality using web technologies. Regular Images can’t be used in the iOS Client.

Support for older Browser Versions, including Internet Explorer, is not necessary, although appreciated.

Source: Ask Javascript Questions