Closed
Description
Describe the bug
FloatImage does not work properly in folium v0.13.0. The image appears to be enlarged many times.
To Reproduce
import folium
from folium.plugins import FloatImage
import base64
m = folium.Map()
image = 'LmTETPX.png' # downloaded from 'https://i.imgur.com/LmTETPX.png'
with open(image, "rb") as lf:
b64_content = base64.b64encode(lf.read()).decode("utf-8")
widget = FloatImage(
"data:image/png;base64,{}".format(b64_content),
bottom=50,
left=75,
)
widget.add_to(m)
m
Directly passing the image path does not work either.
m = folium.Map()
image = 'LmTETPX.png' # downloaded from 'https://i.imgur.com/LmTETPX.png'
FloatImage(image, bottom=50, left=75).add_to(m)
m
Expected behavior
It works as expected in folium v0.12.1.post1
Environment (please complete the following information):
- Browser: chrome
- Jupyter Notebook
- Python version: 3.9
- folium version: 0.13.0
- branca version: 0.4.2