changed Image query to Image.where