@classmethod
def from_filename(cls, filename):
    """Return a cache type from its image filename."""
    if filename == 'earthcache':
        filename = '137'
    if filename == 'mega':
        filename = '453'
    return cls(filename)
