npm / react-medium-image-zoom
react-medium-image-zoom
What changed in react-medium-image-zoom 4 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.
11 breaking3 new APIs and options2 behavior and defaults8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initreact-medium-image-zoom 523 changes
Breaking changes 10
Renamed
closeTexttoa11yNameButtonUnzoom.Renamed
openTexttoa11yNameButtonZoom.Removed; specify the overlay color via CSS using
[data-rmiz-modal-overlay="visible"].Removed; specify the overlay color via CSS using
[data-rmiz-modal-overlay="hidden"].Sets
"type": "module"for ESModule usage.Removed.
Removed; specify transition duration via CSS using
[data-rmiz-modal-overlay]and[data-rmiz-modal-img].Removed.
Removed.
Removed.
New APIs and options 3
Added to customize the unzoom button.
Added to customize the zoom button.
Added to provide attributes for an image that should be loaded on zoom.
Behavior and default changes 2
Images must match the specified querySelector criteria to be found; elements with
aria-hidden="true"are excluded.Improved zooming support for images, picture and figure elements, and div and span elements with background images.
Fixes and other changes 8
Removes invalid aria-owns usage from rendered markup.
Opening or closing a zoom no longer shifts the page's scroll position, preventing scroll-driven UI from firing as though the user scrolled.
Unzoom now restores the previous scroll position instantly, avoiding animation from the top of the document on pages with smooth scrolling.
Fixes erratic zoom/pan when page height exceeds the viewport in Safari on iOS.
The mirror effect on a zoomed image now works with transform: scaleX(-100%).
Using controlled zoom and ZoomContent at the same time no longer breaks.
Fixed compatibility with React server-side rendering.
Fixed an issue involving an empty string being passed to the src attribute.
react-medium-image-zoom 41 changes
Breaking changes 1
The project was completely rewritten with breaking changes and a new API; see the README for migration details.