The zoom CSS property is a simple way to do this now that is now widely supported. This works perfectly and couldn't be easier. The only caveat is that it is only widely available since May 2024. https://caniuse.com/css-zoom
<img src="https://picsum.photos/300/400" style="zoom:50%">