Set export service to set correct svg image mimetype

For #1538
This commit is contained in:
Dan Brown
2019-07-17 22:36:49 +01:00
parent 629b7a674e
commit 1e7df28238
3 changed files with 35 additions and 1 deletions

View File

@ -442,7 +442,12 @@ class ImageService extends UploadService
return null;
}
return 'data:image/' . pathinfo($uri, PATHINFO_EXTENSION) . ';base64,' . base64_encode($imageData);
$extension = pathinfo($uri, PATHINFO_EXTENSION);
if ($extension === 'svg') {
$extension = 'svg+xml';
}
return 'data:image/' . $extension . ';base64,' . base64_encode($imageData);
}
/**