SOLVED! The problem was that I had only JP sharing plugin installed but I needed to have Jetpack Full plugin installed as well.
I discovered that the code was using:
if ( class_exists( 'Jetpack_PostImages' ) ) {
And that got me thinking that it was looking for something in the full jetpack plugin. I installed and activated it and voila it worked!