Using GD library PNG support on Mac OSX Yosemite

When I upgraded to my main machine to Yosemite, I've encountered a case that some images on Drupal installation doesn't generate image-style images. The status page shows that the GD library was not complied with PNG support.

The solution is to install the latest php. I followed the following page, basically to install php55 using home brew.