The gallery is resizing correctly but Google Pagespeed Insights does not recognize the new scaled size, only the fixed 447X705 thumbnail size.
The score I get is abysmal due to this.
The images are optimized via shortpixel.
How am I going to get GPSI to recognize the scaled data?
I finally solved this by changing the masonry from flexible to perfect grid.
I do not know why flexible was not working.