Skip to content

add_layout_image doesn't work with a local image #2975

@MaxGhenis

Description

@MaxGhenis

add_layout_image works for me with a web-hosted image, e.g.:

fig = px.bar(x=['a', 'b', 'c'], y=[3, 4, 1])
fig.add_layout_image(dict(
    source="https://raw.githubusercontent.com/UBICenter/blog/master/jb/_static/ubi_center_logo_wide_blue.png",
    sizex=0.2, sizey=0.2))

image

But when passing the identical image, stored locally, nothing shows up:

fig.add_layout_image(dict(
    source="../_static/ubi_center_logo_wide_blue.png",
    sizex=0.2, sizey=0.2))

image

I'm on plotly 4.14.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions