Only try to empty image if is gallery