Before you begin
You need to sign in to Wix Media Manager to create an account and you need to prepare a Google Compute Engine virtual machine instance to host your Node.js application.
After signing in, copy the API Key and API Secret values. You will add these to your code to authenticate with the Wix Media Platform.
Quickly deploy Node.js on Compute Engine using Bitnami in just a few clicks.
npm install wixmedia
var BASE_URL = "media.wixapps.netggl-685734655894940532967/images/"; var imageId = "ae1d86b24054482f8477bfbf2d426936" var image = WixMedia.WixImage(BASE_URL, imageId, “cats.jpg”); var crop = image.crop().w(1000).h(1000).x(100).y(100); // prints out the new URL for an image that has width of 1000px and height of 1000px, cropped from 100, 100 console.log(crop.toUrl());