@staticmethod
def media_category_for_type(media_type):
    """Determine Twitter media category by mime type."""
    if media_type is None:
        return None
    if media_type.startswith('image/gif'):
        return 'tweet_gif'
    if media_type.startswith('video/'):
        return 'tweet_video'
    if media_type.startswith('image/'):
        return 'tweet_image'
    return None
