Compression of Images (TinyPNG)

Options
Just saw this video on compressing images and it looks amazing.

One concern though, waiting ~20secs for the api to complete is a bit too long for the app users. I know the larger the size the longer the wait, but images coming straight from the phone can be 2-4MB at times.

Is there a way to reduce this wait time or get this to run in the background?


Comments

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    A couple of ideas:

    1) You upload the file to xano, and add its reference to table of files to process. Then you process via a background task.
    2) You use the technique in the video in the API endpoint, but tell your front-end to "forget" about the request - don't wait for it to come back or care at all about it. If your app closes while the API endpoint is running, that's fine - the API endpoint will finish its work whether the frontend is paying attention or not. 
  • Joseph
    Joseph Member
    Options
    Those are great suggestions - thanks Ray!