posit-dev / posit-dev/positron

Images displayed with `IPython.display.Image` appear excessively zoomed in (new) Positron notebooks

Open
#10,474 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: notebooks-jupyter area: notebooks-stability theme: new notebook frontend
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 9h
Merged PRs (30d)
195

Description

System details:

Positron Version: 2025.12.0 build 35
Code - OSS Version: 1.105.0
Commit: 5418e79f67133ab96a97fc1b3b80e9d3314032e7
Date: 2025-11-06T07:19:04.909Z
Electron: 37.6.0
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.0.0
Session details:

Python 3.13

Describe the issue:

  • Images rendered using IPython.display.Image appear zoomed in in new notebooks.
  • The same code renders correctly in old notebooks, where the full image is displayed at its natural resolution.
  • The issue seems related to how the new notebook renderer handles scaling and layout for image outputs.
    In the affected environment, the output cell appears to apply a CSS transform or non-default scaling to the <img> element.

Expected or desired behavior:

As a notebooks user, I want images displayed with IPython.display.Image to render at their natural resolution (or at the specified width/height) so that visual results are consistent across notebook formats.

Steps to reproduce the issue:

  1. Place an image file (e.g., test.png) in the same directory as the notebook.
  2. Run the following code in both an old and a new notebook:
    from IPython.display import Image, display
    display(Image(filename="test.png"))
    
  3. Compare outputs between the two notebooks.

Expected:
The image displays at its natural resolution (or according to width/height parameters).

Actual:
In new notebooks, the image appears zoomed in or cropped, showing only a portion of the original image.

Notes:

  • The issue affects only new notebooks; old notebooks render correctly.
  • This appears to be a rendering/scaling issue in the notebook output webview.
  • This is different from #10473 (where image is NOT rendered at all). Herein, the image is rendered, but without appropriate scaling.
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in a new Positron notebook with the provided IPython.display.Image example, then inspect the notebook output webview's image scaling and layout behavior. Done means images render at natural resolution or their specified width and height without being zoomed or cropped, while old and new notebooks remain consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.