If you simply retrieve the lists using SharePoint Rest API, I suggest using HttpClient instead. It's the newest/modern API that supports asynchronous http requests.
Your HttpWebRequest may have involved some disposing issue but I can't prove.
using (var httpClient = new HttpClient())
You can use the getBlob method to get the image bytes as blob and then bind that to the HTML element somewhat as below. If you know a different way, you can use that as well:
let groupPhotoUrl = window.URL ||...