NodeJS server side cropping procedure