Recognition files currently only work with .jpg as the filetype. Therefore, when image recognition files are uploaded, other file types must be converted to .jpg.
After users add a page and choose a file to upload, it needs to be converted and saved as a .jpg. This is not necessary for media displayed in the app - only image recognition files. Multiple file types are supported for media files.
This can be done on the client-side before the file is uploaded to the server:
Alternatively, this library shows some promise: