Using dynamically generated pictures in Inform7

I’m trying to use a dynamically generated picture in a Inform 7 IF. The IF will be published on a website and i want to use a php-script to generate a unique picture for each player. Does anyone have an idea how to accomplice that or has anyone done that yet?

This is more a direction to look in than a full answer, but check out Vorple. It allows you to make various JavaScript calls from within your Inform 7 game: