function getDataUri() { $imageData = $this->getBase64Encoded(); return sprintf('data:image/%s;base64,%s', $this->extension, $imageData); }