sort image using nodejs and mongodb