diff --git a/src/Services/ImageDataService.php b/src/Services/ImageDataService.php index 7672bd7..ab25068 100644 --- a/src/Services/ImageDataService.php +++ b/src/Services/ImageDataService.php @@ -22,7 +22,8 @@ public function encodeImage(string $imagePath): string { $image = file_get_contents($imagePath); //Encode the image to base64 and remove the prefix to get raw data - $imageData = base64_encode($image); - return preg_replace('#^data:image/[^;]+;base64,#', '', $imageData); + $rawData = base64_encode($image); + + return $rawData; } }