[Imported from Tumblr]
Not Maintained: This blog post is here for historical purposes and is no longer maintained.

First, before you go any further… check to make sure the image you’re trying isn’t just broken.

I visited the image in the browser and realized that the browser supported the format, so the broken preview had to be somewhere in filepicker.

In my case I was using a(n) .ico file and since filepicker.io only supports post processing on .jpg and .png I had to come up with a work around.

Once I realized the breakage was in the /convert directive that was automatically filled in for me by the rails gods, the search was on. I dug through the application layer and the gem and I couldn’t get it to relinquish its post processing madness.

So I did what any programmer would do. I hacked the preview to use the plain filepicker url instead of decorating it and it worked greatâ„¢. I used javascript but I’m sure the tangled mess you end up different will require different scissors. I wrote this in case it should one day help a frustrated programmer in need if nothing else, with the simple knowledge that he is not alone in his plight.