reserve PNG Format and Transparency for Flexible-Height and Flexible-Width Custom Headers
|Reported by:||chellycat||Owned by:||ryan|
Normally, when a user uploads a custom header image, they are prompted to crop the image to their desired size if the image is not the exact dimensions specified by the theme. After cropping, the image is compressed and becomes a JPG.
In the past, if users wanted to avoid this compression (to use a transparent PNG for their header image, for example), they could upload their header image at the exact dimensions specified by the theme.
However, with the flexible dimensions, users are always prompted to crop. This means that transparent pngs are converted to JPG and lose their transparency in the process.
- Switch to a theme that supports flexible header dimensions (such as Twenty Eleven)
- Go to Appearance > Header and upload a transparent png that has the "recommended dimensions" specified by the theme.
- You'll be prompted to crop the image.
- After cropping, observe how the image becomes a JPG and thus loses its transparency.
The ideal solution would be for PNG images to remain PNGs and to preserve their transparency when cropped.