added support for media generated with matplotlib