PNG files supported in Galaxy S2's gallery, but not when opening as attachment

My site creates PNG image files via PHP. When downloading on my Galaxy S2 I can’t view the PNG, but the device’s gallery does display it correctly. I get that these are two different apps with different codec support, but I would like to know if there is a preferred way to generate PNG files for maximum support across mobile devices