<?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);
}