Bubble filtering through porous media