Help with responsive image between two divs

I am trying to recreate this but having trouble.

How can I responsively alter the image the way it is done in the video? I have tried to do it with Bootstrap and Jquery but the image doesn’t maintain it’s height to width ratio when resized. I posted a StackOverflow post with my code but nobody has been able to help me out.