mirror of
https://github.com/Intervention/image.git
synced 2025-08-25 23:06:13 +02:00
set default type for undefined data-url encodings
This commit is contained in:
@@ -143,9 +143,11 @@ abstract class AbstractEncoder
|
|||||||
*/
|
*/
|
||||||
protected function processDataUrl()
|
protected function processDataUrl()
|
||||||
{
|
{
|
||||||
|
$mime = $this->image->mime ? $this->image->mime : 'image/png';
|
||||||
|
|
||||||
return sprintf('data:%s;base64,%s',
|
return sprintf('data:%s;base64,%s',
|
||||||
$this->image->mime,
|
$mime,
|
||||||
base64_encode($this->process($this->image, null, $this->quality))
|
base64_encode($this->process($this->image, $mime, $this->quality))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user