build/www/img: Support multiple file extensions

This uses a flexible regular expression to match different image
extensions.