Foam is widely used as a selective blocking agent through mobility control in oil field development. Its flow behavior in porous media has been investigated sufficiently, but few studies were carried out to understand the change of foam texture in flow. In this work, sandpack and micromodel experiments were conducted simultaneously to analyze foam flow behavior from the perspective of foam texture. Based on the measured flowing pressure and the observed foam image, the correlation between blocking pressure and foam texture was quantitatively investigated. The blocking pressure has a strong correlation with average diameter (-0.906) and variation coefficient (-0.78) and has a positive correlation with the filling ratio (0.84). These indicate that the blocking performance of foam is influenced by its texture closely. But path analysis shows only that the average diameter and variation coefficient have a significant direct effect on blocking pressure (-0.624 and -0.404). These show that the blocking capacity of foam is mainly influenced by the size and uniformity of bubbles. Tiny, dense, and homogeneous foam has a stronger blocking capacity. This study provides a deep insight of foam flow in porous media.