Skip to content

Image show fails in Firefox with high resolution image  #4268

Open
@ianpegg-bc

Description

@ianpegg-bc

image This large 10709x2425 image fails to show with px.imshow or with add_layout_image on Firefox. It does load on Chrome.

from urllib.request import urlretrieve

import plotly.express as px
import PIL.Image

image_url = "https://github.com/plotly/plotly.py/assets/86078178/11c9876a-233c-4a2b-bfd8-5d8f197ca808"
image_file = urlretrieve(image_url)[0]

with PIL.Image.open(image_file) as image:
    px.imshow(image).show()

    downsampled_image = image.resize((image.width // 4, image.height // 4))
    px.imshow(downsampled_image).show()

This code should display a blank plot, followed by a plot of the desired image.

Versions:

plotly:  5.15.0
kaleido: 0.2.1
firefox: 114.0.2 (64-bit)
system:  Ubuntu 20.04.6 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions