public static function getResponseFromDataUri($dataUri)
    {
        $mimeType = substr($dataUri, 5, strpos($dataUri, ';') - 5);
        $content = base64_decode(substr($dataUri, strpos($dataUri, ',') + 1));

        return new Response($content, Response::HTTP_OK, [
            'Content-Type' => $mimeType,
        ]);
    }