How to do a cropping/zoom animation for background image on scroll

I want to replicate this effect but not sure where to start.

I know you can visually increase and decrease width of an image on scroll with the help of padding and eventListener but not sure how to do this. Also is it possible with framer motion?