
Pilbox: an image resizing application server - agschwender
http://agschwender.github.io/pilbox/
======
wasabian
I was recently looking for services that could handle resizing and cropping.
Personally I prefer the ones that act like a proxy, so I can store the images
in my own S3 bucket. Here are the services I found:

[http://www.imgix.com/](http://www.imgix.com/)
[http://cloudinary.com/](http://cloudinary.com/)
[http://www.cdnconnect.com/](http://www.cdnconnect.com/)
[http://cloudresize.com/](http://cloudresize.com/)
[http://cloudimage.io/](http://cloudimage.io/)
[http://www.blitline.com/](http://www.blitline.com/)
[https://transloadit.com/](https://transloadit.com/)
[https://uploadcare.com/](https://uploadcare.com/)
[http://www.resrc.it/](http://www.resrc.it/)

~~~
e98cuenc
You can add ours to the arena: [http://thumbr.io/](http://thumbr.io/)

------
slig
See also thumbor [1], it's been used and developed by the biggest news portal
of Latin America.

> thumbor is a smart imaging service. It enables on-demand crop, resizing and
> flipping of images.

> It also features a VERY smart detection of important points in the image for
> better cropping and resizing, using state-of-the-art face and feature
> detection algorithms (more on that in Detection Algorithms).

[1] [https://github.com/globocom/thumbor](https://github.com/globocom/thumbor)

------
audionerd
Pilbox looks great. Added it to this list of such image resizing services:

    
    
      https://github.com/adamdbradley/foresight.js/wiki/Server-Resizing-Images
    

Many, many implementations, and each goes about it differently. There's
unfortunately no widely adopted standard for constructing a URL to request a
resized/altered image.

It would be great to see traction on something like this RESTful Image API
Specification:

    
    
      https://github.com/riapi/riapi

~~~
yesimahuman
Adam, the guy who built foresight.js in your link above, runs a CDN with image
resizing features built in:
[http://www.cdnconnect.com/](http://www.cdnconnect.com/)

It has some other cool features like optimizing images/serving webp ones if
supported by the client. It can also convert Illustrator and PSD files into
svg or jpg/png files. Worth checking out in addition to Pillbox.

------
joevandyk
This is a perfect use for [http://www.docker.io](http://www.docker.io), btw.
I'd love to be able to run 'docker run pillbox' and have it download and
install all the dependencies.

(The point of docker is that _everything_ pillbox requires on can be separated
completely out from the rest of the system. pillbox requires many libraries.
it could require nginx + a special config for proxying. I don't want to do
'apt-get install pillbox' and have it install all this stuff system-wide. I
want to keep everything pillbox needs in a separate environment and
communicate with it via a port.)

I think nginx should be included for a proxy cache in front of pillbox. Docker
would make this simple to setup.

~~~
nickstinemates
Let's work on it together.

~~~
joevandyk
email sent!

------
sebslomski
I was looking for something like that (hosted) yesterday and I stumbled upon
cloudinary[1].

The do the resizing part for you as well as the hosting. But the best thing
they offer is face recognition. It's incredible! I haven't been in live with a
service since guthub.

Their free tier is probably enough for smaller projects (but without backups
in your S3 bucket)

Thumbnails with focus on the face looks fantastic!

[1]
[http://cloudinary.com/invites/lpov9zyyucivvxsnalc5/bwrrdazeh...](http://cloudinary.com/invites/lpov9zyyucivvxsnalc5/bwrrdazeh7ebeztqhkx1)
(affiliate link. Without: [http://cloudinary.com](http://cloudinary.com))

~~~
joevandyk
I wonder what they use for the face recognition, and if that could be added to
pillbox?

~~~
citizenterminal
Looks like pilbox already supports some sort of facial recognition. From the
changelog:

0.5: Facial recognition cropping

------
chrisohara
We built something similar in node.js (as express/connect middleware)

[http://github.com/sydneystockholm/imgr](http://github.com/sydneystockholm/imgr)

------
manuels__
You can also do this right in Javascript on the client side using ImageMagick.

see [http://manuels.github.io/unix-toolbox.js/](http://manuels.github.io/unix-
toolbox.js/) and [https://github.com/manuels/unix-toolbox.js-
imagemagick/tree/...](https://github.com/manuels/unix-toolbox.js-
imagemagick/tree/master/demo)

------
liyanchang
Being able to resize images via url parameters is one of those great ideas,
but I've always been surprised by how long it's taken to catch on.

Awesome.

~~~
na85
Honest question: Why is it such a great idea?

Wouldn't it be easier/quicker to either:

a) Have a command-line tool to resize images? Alternatively, one that's
integrated into the shell so that you can access it from context menus? I.e.
right-click -> "resize image"

b) Just open it in mspaint or your open-source image editor of choice?

~~~
joevandyk
It's simpler to store the original image, then generate URLs like
[http://image-
server.com/resize?url=http://s3.com/original.jp...](http://image-
server.com/resize?url=http://s3.com/original.jpg&width=300&height=200)

This lets you change the size of thumbnails by only changing the URLs.

I've been doing it for years, works great.

~~~
brandon272
Doesn't this mean that the server needs to manually process the image on each
request?

~~~
michaelmior
You should stick a CDN in front so this doesn't happen. Ideally once the
server generates the image, it would also be cached there.

~~~
joevandyk
You probably want nginx in front of pillbox. Nginx setup as a basic http proxy
cache.

So, CDN -> nginx -> pillbox.

This is because CDNs can send lots of concurrent requests to the origin server
if lots of people are requesting the same new image simultaneously.

------
hcarvalhoalves
Cool. I bet this a pain point for many projects. I had the same problem and
ended up cooking up something similar for Django [1], but I like that this one
leverages Tornado.

[1] [https://github.com/hcarvalhoalves/django-rest-
thumbnails](https://github.com/hcarvalhoalves/django-rest-thumbnails)

------
tingletech
Do any of these support International Image Interoperability Framework: Image
API 1.0 [http://www-sul.stanford.edu/iiif/image-api/](http://www-
sul.stanford.edu/iiif/image-api/) ?

------
michaelmior
1000 Memories released a cool Java service for this called Photon.

[https://github.com/1000Memories/photon-
core](https://github.com/1000Memories/photon-core)

------
j4mie
Similar idea, same tech, more mature (but more complex?):
[https://github.com/globocom/thumbor](https://github.com/globocom/thumbor)

------
nkg
Just to make you laugh : I worked as a webdesigner for a retail chain, and we
have bought Adobe's Scene7 which does quite the same job. It was a 102 000$ /
2yr deal.

~~~
tommccabe
I've used Scene 7 for the past five years and think that it is a great
product. The cost may seem expensive if you just look at the dynamic
resize/crop technology and hosting, but it is a good solution for digital
asset management for e-commerce. Our photo studio and re-touchers upload
directly into Scene 7 and it has simplified the entire workflow.

~~~
nkg
I agree that Scene7 is a good product, but really overpriced, though my
company was happy to pay for it because it was like a magic patch applied on
their shitty worflow.

------
stcredzero
Wouldn't this be just a bit more awesome in some use-cases as a PNaCl app?

EDIT: I get it now: People would change the URL to dynamically request an
image of just the size they need.

------
1010011
Awesome! My teams have needed this. Thank you

