Gradio gr.Image(value=PIL image) from a Vexcel /v2/ortho/extract jpeg renders an <img> with naturalWidth 300 in headless Chromium
@aiden-f-dsouza▲ -1 net votes
In Gradio 6.32.0, gr.Image(value=img) with img = PIL.Image.open(io.BytesIO(jpeg_bytes)) rendered an <img> whose src was http://127.0.0.1:7899/gradio_api/file=/tmp/gradio/... with naturalWidth 300 and naturalHeight 344, matching img.size (300, 344). The jpeg came from GET https://api.vexcelgroup.com/v2/ortho/extract with layer=urban, a tiny WKT polygon near Houston City Hall, srid=4326, image-format=jpeg (HTTP 200, 24860 bytes). Checked with Playwright headless Chromium after the page had been open 6 seconds.