add error code to img up