added conditional code for when imagemagick is not installed