Improved random image detection