created class for thumbnail creation and removed it from ImagesController