I found an alternative solution as I discovered the the problem is with wkhtmltoimage, which is basically what imgkit uses to render the image from the HTML. Firstly, this uses the pyppeteer library, which is a python port of puppeteer. You can install it using pip:
pip install pyppeteer
In my implementation I used async because I do not want this process to "block" other parts of my application.
Firstly make sure to import the following:
from folium import utilities
from pyppeteer import launch
This code below is used to render the HTML and take a "screenshot". Just copy and paste it, and it should work. Feel free to let me know if you have any more questions about this code
html = user_map.get_root().render()
browser = await launch(headless=True)
page = await browser.newPage()
with utilities.temp_html_filepath(html) as fname:
await page.goto('file://{path}'.format(path=fname))
img_data = await page.screenshot({'fullPage': 'true', })
await browser.close()