posit-dev / posit-dev/positron
Images displayed with `IPython.display.Image` appear excessively zoomed in (new) Positron notebooks
Nobody has claimed this yet.
- 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.Imageappear 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:
- Place an image file (e.g.,
test.png) in the same directory as the notebook. - Run the following code in both an old and a new notebook:
from IPython.display import Image, display display(Image(filename="test.png")) - 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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