Added support for media files as well as configurable media and static URLs.