public function hasImageExtension($extension = null)
    {
        if(!$extension && $this->extension) {
            $extension = $this->extension;
        }

        if(!$extension) {
            throw new \Exception("No extension given");
        }

        if(array_intersect([strtolower($extension),strtoupper($extension)], config('media.image_extensions'))) {
            return true;
        }
        return false;
    }