I have seen that in using :styles
attributes in Paperclip, you ca specify sizes with #, as :thumb => "100x100#"
as well as with >, as :medium => "480x320>"
. I am not exactly sure about the difference between the usage of # and >. Can anyone please enlighten me? Thanks.
These follow the rules of formatting for ImageMagick which can be found here
The >
lets the image keep the same aspect ratio when it is being scaled so it doesn't get distorted.
You will not find the #
key in the ImageMagick docs though, that is special to paperclip. It allows simple cropping of thumbnails to the specified size. See here for a good explanation [via Wayback Machine], about halfway down the page.
The string you are referring to is passed to ImageMagick as a geometry string. You can read more about the possible values here: http://www.imagemagick.org/Magick++/Geometry.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With