pictor is simple image upload/convert/download server.

The name of pictor comes from Pictor, a constellation.



Local storages and traffic are expensive, especially in cloud envionment.

There're many cheap and large cloud/remote storages services,
most of them provide cheap and fast HTTP access.

ex. Amazon S3, FTP+HTTP Static Image Hosting Services...

pictor is designed for these environment.

pictor basically works as following:

  • upload is accomplished by pictor. cloud/remote storage can do if possible.
  • convert is accomplished by pictor.
  • download is accomlished by cloud/remote storage. pictor can do if you want.
  • all files are stored in cloud/remote storage. local storage can do if you want.
  • all variant files(generated by pictor) could be deleted at any anytime. pictor will generate it on demand.


Getting Started

  1. install prerequisites

    for mac osx:

     brew install graphicsmagick

    for debian/ubuntu linux:

     apt-get install graphicsmagick

    or else see http://graphicsmagick.org

  2. get source from github:

     git clone git@github.com:iolo/pictor.git

    or install with npm:

     npm install pictor
  3. startup pictor server

     node app.js

    or startup with cluster:

  4. test run in browser

     open http://localhost:3001
  5. test run in console



configuration files are separated for each envionment(NODE_ENV environment variable) in config directory.

for more details, see source code of default configuration.

Generated Documents

Advanced Topics

  • embedding pictor in other expressjs app
  • custom storage
  • custom converter
  • TBW...


  • to show debug logs

set DEBUG environment variable to * or pictor:* and run pictor.

see http://github.com/visionmedia/debug

config/ --- configurations for each environment(server-side)
libs/ -- nodejs modules(server-side) --> jshint, doxx task
    converter/ -- converters
    storage/ -- storage providers
    pictor.js -- the main module
routes/ -- expressjs modules(server-side) --> jshint, apidoc task
    **/*_test.js -- nodeunit testcases(server-side) --> nodeunit task
    **/*_test.html -- qunit testcases(client-side) --> qunit task
app/ -- source of static web resources(client-side) --> concat, uglify, copy, jade task
    js/ -- javascript source(client-side) --> jshint task
    app/ --> build output of static web resources(client-side)
        api/ --> generated documents of apidoc for routes/ --> apidoc task
        dox/ --> generated documents of doxx for libs/ --> doxx task
app.js -- launcher without cluster(server-side)
bin/pictor -- launcher with cluster(server-side)
  • to generate api documents from source
grunt apidoc
open build/app/docs/api/index.html
  • to generate source code documents from source
grunt doxx
open build/app/docs/api/index.html


that's all folks...

may the source be with you...