Fix bug for empty images in JSON