fixed random image validation