public function getBase64Content($to_href = false)
    {
        if ($this->exists() && $this->isImage()) {
            $image_infos = $this->getImageInfos();
            $base64 = '';
            if ($to_href) {
                $type = pathinfo($this->getRealPath(), PATHINFO_EXTENSION);
                $base64 .= 'data:image/' . $type . ';base64,';
            }
            $data = file_get_contents($this->getRealPath());
            $base64 .= base64_encode($data);
            return $base64;
        }
        return '';
    }