Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including photon with all npm packages installed. Try it out:

var photon = require("photon")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

photon v3.0.0

JavaScript library for the Photon image manipulation service


Build Status

JavaScript library for the Photon image manipulation service.

How to use


Install for Node.js via npm:

$ npm install photon

Now you can simply require('photon') in your module to generate Photon URLs.

var photon = require('photon');

var url = photon('')



Include dist/photon.js in a <script> tag. A photon global variable function is exposed:

<script src="photon.js"></script>
  var url = photon('')


You can also consume photon.js via browserify when installed via npm (see Node.js instructions above).

Terms of Service

  • Use of this service is for users of the Jetpack by plugin only, and may be used by sites hosted on, on Jetpack-connected WordPress sites, or sites who have gotten special permission from Automattic Inc. If you move to another platform, or disconnect Jetpack from your site, we can’t promise it will continue to work.

  • Abuse of the Jetpack by Terms of Service could result in suspension of your site from services. By enabling Photon you agree to be responsible in what you publish; in particular be sure that you don’t use the service for prohibited items (things like spam, viruses, or hate content). reserves the right, in its sole discretion, to temporarily or permanently revoke your ability to use and access Photon, with or without notice.


MIT – Copyright 2014-2018 Automattic

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free