1
0
mirror of https://github.com/Intervention/image.git synced 2025-02-06 22:00:38 +01:00

set default type for undefined data-url encodings

This commit is contained in:
Oliver Vogel 2014-08-21 20:49:04 +02:00
parent a912b12ede
commit 478b5a07ac

View File

@ -143,9 +143,11 @@ abstract class AbstractEncoder
*/
protected function processDataUrl()
{
$mime = $this->image->mime ? $this->image->mime : 'image/png';
return sprintf('data:%s;base64,%s',
$this->image->mime,
base64_encode($this->process($this->image, null, $this->quality))
$mime,
base64_encode($this->process($this->image, $mime, $this->quality))
);
}