wixmedia-js SDK
Wix Media Platform is a collection of services for storing, serving, uploading, and managing image, audio, and video files.
This package is an isomorphic JavaScript library (works in Node and in the browser) that provides a convenient API to access Wix Media Platform image manipulation APIs.
Prerequisites
To begin working with Wix Media Platform:
Installation
Using npm
$ npm install wixmedia
Using bower
$ bower install wixmedia
Usage
Image Manipulation
Node.js
var BASE_URL = "<your base URL here>";var WixImage = WixImage;var image = ;var fit = image;//prints out the new URL for an image that has width of 1000px and height of 1000pxconsole;
Browser, no AMD
var BASE_URL = "<your base URL here>";var image = wixmedia;var fit = image;//prints out the new URL for an image that has width of 1000px and height of 1000pxconsole;
Browser, using require.js
;
Image Uploading, Node only
Node.js with Callbacks
var API_KEY = "<API KEY>";var API_SECRET = "<SECRET_KEY>";var wixmedia = ; var uploader = wixmedia;uploaderimages;
Node.js with Promises
var API_KEY = "<API KEY>";var API_SECRET = "<SECRET_KEY>";var wixmedia = ; var uploader = wixmedia;uploaderimages;
Read the docs
Read the API docs to learn more about this library
Wix Media Platform
Wix Media Platform provides powerful image-processing services that support resizing, cropping, rotating, sharpening, watermarking, and face-detection, as well as offer a number of filters and adjustments.
Learn more about image manipulation here: Wix Media Platform - Images.