public function setSize($width, $height)
    {
        if (!is_string($width) && !is_int($width)) {
            throw new \InvalidArgumentException('The width argument must be of type string or integer');
        }
        if (!is_string($height) && !is_int($height)) {
            throw new \InvalidArgumentException('The height argument must be of type string or integer');
        }
        $this->html = preg_replace("/ width([ ]?)=([ ]?)[\"\']([0-9\.]+)[\"\']/", " width=\"" . $width . "\"", $this->html);
        $this->html = preg_replace("/ height([ ]?)=([ ]?)[\"\']([0-9\.]+)[\"\']/", " height=\"" . $height . "\"", $this->html);
        $this->html = preg_replace("/width:([0-9\.]+)px/", "width:" . (is_numeric($width) ? $width . 'px' : $width) . "", $this->html);
        $this->html = preg_replace("/height:([0-9\.]+)px/", "height:" . (is_numeric($height) ? $height . 'px' : $height) . "", $this->html);
        $this->html = preg_replace("/ width([ ]?)=([ ]?)([0-9\.]+)/", " width=" . $width, $this->html);
        $this->html = preg_replace("/ height([ ]?)=([ ]?)([0-9\.]+)/", " height=" . $height, $this->html);
        $this->width = $width;
        $this->height = $height;
    }