fixing missing error message when wrong image type uploaded for badge image