I allow users to upload images to my app. I’m using attachment_fu and
MiniMagick.
There’s two things that I’d like to do:
1- No matter what format the original file is I’d like to save it in jgp
format.
2- I want to keep all images limited to say 1000px width, so resize if
they are bigger.
Resizing is a basic feature, take a look at the README. Format
transformation, on the other hand, is more difficult and is not a
known feature of attachemnt_fu…
Here’s an example of how to do what you want with Rmagick (probably
works in
principle with mini magick, but not sure):
It’s a module we mix in to monkey patch (i.e. redefine methods locally)
attachment_fu’s built in processor code for Rmagick in the Kete app ( http://kete.net.nz).