Implement image validation [closes #5]