public function image($email, $alt = null, $attributes = [], $rating = null)
    {
        $dimensions = [];

        if (array_key_exists('width', $attributes)) {
            $dimensions[] = $attributes['width'];
        }
        if (array_key_exists('height', $attributes)) {
            $dimensions[] = $attributes['height'];
        }

        if (count($dimensions) > 0) {
            $size = min(self::MAX_SIZE, max($dimensions));
        } else {
            $size = $this->defaultSize;
        }

        $src = $this->src($email, $size, $rating);

        if (!array_key_exists('width', $attributes) && !array_key_exists('height', $attributes)) {
            $attributes['width'] = $this->size;
            $attributes['height'] = $this->size;
        }

        return $this->formatImage($src, $alt, $attributes);
    }