cvan/galaxy — pull request #115 by cvan (2014-03-10 03:37:21+00:00)
Title: use aviary for resizing, cropping, uploading icon uploads (issue #49, issue #98)

![](http://f.cl.ly/items/0t3E193v0c0M3t163i0N/Screen%20Shot%202014-03-09%20at%208.29.32%20PM.png)

I've found that [Aviary](http://developers.aviary.com/docs/web/setup-guide) offers an HTML5 image resizing+cropping library that is perfect for our uses.

This pull request allows a developer to upload an icon from an external URL _or_ local file upload. Aviary does the image cropping, resizing, processing, and then it gives us back a URL of the image on Aviary's servers. We POST back that image URL when we POST the form to the API and the API should then do server-side processing to pipe the remote image to a local file (related to issue #76).

I haven't done this for the screenshots yet. I'll leave that up to y'all. But with Aviary we can easily constrain the aspect ratios and everything, so it's awesome.

This should be a good starting point for the media section. Let me know. Thanks, guys!

/cc @birkanu @yangshun