Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion streamlit_drawable_canvas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ def st_canvas(
background_image_url = st_image.image_to_url(
background_image, width, True, "RGB", "PNG", f"drawable-canvas-bg-{md5(background_image.tobytes()).hexdigest()}-{key}"
)
background_image_url = st._config.get_option("server.baseUrlPath") + background_image_url
base_url_path: str = st._config.get_option("server.baseUrlPath").strip("/")
if base_url_path:
base_url_path = "/" + base_url_path
background_image_url = base_url_path + background_image_url

background_color = ""

# Clean initial drawing, override its background color
Expand Down