handle JSON errors if image tag is not a JSONObject