Implement extended image lists for mediafiles.

Makes the test of 80eded77b10a5fcf855114fb9120d21fcb94e089 work.