Pan and zoom on image hover

Howdy!

I’m attempting to add a small hover interaction onto my portfolio highlight images, where when hovered the image slightly zooms, and can pan along with the mouse. I’ve gotten close to my effect, however it’s very jumpy, and will show the background if gone too far.

What I have currently is live on the first image set on the right image, for reference. Any recommendations on how to make this effect smoother and less jumpy?

Thank you!


Here is my public share link: Webflow - Box 8 Creative