add mini_magick gem
include minimagick; create thumbnail version of image
add thumb-version image if image is not nill