I need to be able to get the dimensions of an image (jpegs/pngs) from a URL in Zapier. Initially I thought this was going to be a simple task with Zapier Code (allows you to program some steps in javascript or python) but that is not the case.
Zapier Code is literally Node. No Jquery. No ability to require. All I have to work with outside base Node is fetch.
Basically I am hoping somebody has had some experience with Zapier and may have an idea. I know I managed to do this by accident once because I was able to access the dimensions of the image in the next step, but I cannot seem to replicate that accident.
Overall endgame is I need to be able to determine that an image is the correct size before continuing in our process.
David here, from the Zapier Platform team.
Bad news is you can't do this in a code step. Good news is, we've made it really easy to spin up a private app that uses npm modules to do exactly what you need!
First, install the CLI, then run zapier init --template=create
to scaffold this app.
In the create, adapt the examples from a module like this. The input will be a url, and you can return an object with height and width. The docs in the main CLI repo linked above should be enough to get you over the line.
Let me know if you've got any other questions!