Image in checkbox label

So here’s the situation I’m facing:

I’ve got a modal popup for a “Report Builder” where I offer users a list of all the graphs on the page in checkbox lists (graph titles as labels currently). For all graphs selected, I use orca to generate static images, and build those into a PDF for the user to download so that they have a shareable report.

My next goal is to pre-build the images and show thumbnails of each next to the graph titles in the selector modal, but so far I can’t get the checkbox labels to include an image.

Doing something like

dcc.Checklist(options=[{"label": "My Graph <img src=''>", "value": "my_graph"}])

only yields a checklist item lableled My Graph <img src=''> rather than evaluating the img tag. Am I missing something obvious here, or is this not possible?

Hi bradsbrown,

I’m facing the same issue with radioitems, did you find a solution?

I never did - looks like it always escapes the HTML, so I ended up just putting my images above the selector list in a separate div.