How to handle CMYK images with Paperclip

Update April 24th 2014: This is quite old and might not work with the current version of paperclip.

In the last project I've worked I found myself reviewing the application again and again on Internet Explorer since suddenly some images started showing a beautiful "not-found-red-cross".

After some research I found some blogs telling that Internet Explorer doesn't support images with a CMYK color scheme (like this one).

Since I'm using Paperclip to handle the uploads to the application it wasn't difficult to find a way to solve this. That's what I did:

As you can see I define a "normalized" style which doesn't change geometry, however it's used to apply the color scheme conversion. Since it's the default style you can use it like current_user.avatar.url without worrying about the style.

comments powered by Disqus