I keep getting a sporadic error from Cloud Functions for Firebase when converting a relatively small image (2mb). When successful, the function only takes about 2000ms or less t
you can add the configurations in your firebase functions definitions something like:
functions.runWith({memory: '2GB', timeoutSeconds: '360'})