Hi, I’m trying to include a feature in my website where I get an image from a third party website, upload it to tinify, compress it, and upload it to Wix Media to use in one of my collections.
I was wondering if such a workflow is even possible in Wix Editor.
I’m trying to follow the official API here (TinyPNG – API Reference), but keep getting errors.
I’m getting the following error in my collection, which displays when hovering over a red exclamation mark on the left of the clicked item in my collection.
The code for one of your data hook functions threw an error. Check your code and try again.
Where can I check the contents of this error anyway? I tried looking at Monitoring or Logs area but found nothing about it… I was even trying to log the error content directly to some random field in my collection, but that has some limitations and is kind of a bad practice…
I have already npm installed tinify and published it, but can’t seem to be able to import it or use it correctly…
The goal is to trigger this workflow when manually making a certain change in my collection, using a data hook. Up to here I was able to do it, and I can successfully apply other changes to the same collection and even other collections, but the tinify call is what is troubling me.
Does anyone have any hints on this? Would be much appreciated!
Sorry if I’m trying something completely impossible or nonsense… Please tell me if that’s the case!
Thanks in advance for any help!