Node js code functions reside on the server and you don’t send them as commands. In your case they would reside in Firebase Functions. In short you would create the function/s and deploy to Firebase Functions (this is a small learning curve). You could then call the node js function either via http or by some event listener in the node js script itself such as listening to change in a firebase node.
The attached file is a good indication of what you may consider instead of Cloudinary. It is perhaps overly complicated by the PDF to image thumbnails and Video first frame Thumbnails.
The file select button is 100% screen size and the canvas and video engines are hidden and not displayed. I use this with Thunkable to select my files from local device and generate thumbnails with original and thumb images stored in Firebase Storage and referenced in Firebase RTDB.
I can look at stripping the code down for you to use as a simple image resizer if you decide to take this further.
Given the perpetual beta issues of Thunkable, I am trying to instead learn more robust and proven methods for production apps such as Ionic/Vue or similar. I am therefore not spending much time here. I am however always on the lookout in the community to try and assist those that have helped me in the past
Have a look at the txt file and PM me if you want some guidance with this method.
Thunkable_filepicker_image-resize.txt (10.3 KB)