use 'mini_magic' gem to prevent error when processing image