imvkmark
1/27/2019 - 3:54 AM

php:base64_image_save

<?php
if (preg_match("/^data:image\/(?<extension>(?:png|gif|jpg|jpeg));base64,(?<image>.+)$/", $item->user->face_image, $matchings)) {
	$imageData = base64_decode($matchings['image']);
	$extension = $matchings['extension'];
	$filename  = sprintf('user-%s.%s', $item->user->id, $extension);
	$disk->put('face_image/' . $filename, $imageData);
}