Use wsgi app to pick the random image (fixes #2)