public function getMedia($tags, $match_all = false)
    {
        if ($match_all) {
            return $this->getMediaMatchAll($tags);
        }

        $this->rehydrateMediaIfNecessary($tags);

        return $this->media
        //exclude media not matching at least one tag
        ->filter(function (Media $media) use ($tags) {
            return in_array($media->pivot->tag, (array) $tags);
        })
        //remove duplicate media
        ->keyBy(function (Media $media) {
            return $media->getKey();
        })->values();
    }