Steps to replicate the issue (include links if applicable):
- The image I used to discover this bug was File:五星二十八宿神形图.jpg, which is natively 16273 × 996 px. The page en:Liang Lingzan contains this image at height 200 px (width 3268 px), embedded within a transclusion of Template:Panorama, and is affected by the bug.
- This has been verified with thumbnails, standalone images, and Template:Panorama.
- Demonstration: https://en.wikipedia.org/w/index.php?oldid=1350086502
What happens?: Very wide images fail to render in some browsers if they are rendered at larger than the page width, but less than half the size of the original. See https://en.wikipedia.org/wiki/File:Panorama_image_rendering_issue.jpg for a screenshot. For File:五星二十八宿神形图.jpg, the height-200 thumbnail generates the following HTML:
<img src="//upload.wikimedia.org/wikipedia/commons/thumb/d/d2/%E4%BA%94%E6%98%9F%E4%BA%8C%E5%8D%81%E5%85%AB%E5%AE%BF%E7%A5%9E%E5%BD%A2%E5%9B%BE.jpg/3840px-%E4%BA%94%E6%98%9F%E4%BA%8C%E5%8D%81%E5%85%AB%E5%AE%BF%E7%A5%9E%E5%BD%A2%E5%9B%BE.jpg" decoding="async" width="3268" height="200" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/d2/%E4%BA%94%E6%98%9F%E4%BA%8C%E5%8D%81%E5%85%AB%E5%AE%BF%E7%A5%9E%E5%BD%A2%E5%9B%BE.jpg/6536px-%E4%BA%94%E6%98%9F%E4%BA%8C%E5%8D%81%E5%85%AB%E5%AE%BF%E7%A5%9E%E5%BD%A2%E5%9B%BE.jpg 2x" data-file-width="16273" data-file-height="996">
Other information (browser name/version, screenshots, etc.): I was able to verify this issue in Safari 26.3.1 and Firefox 149.0.2 in macOS 26.3.1. A screenshot of the demo in Safari is available at File:Panorama_image_rendering_issue.jpg, but is too big to attach here.