Closed johnpturner8 closed 2 years ago
@johnpturner8 ah good catch, let me see about plugging this bug.
Got a fix in place, will push out a new version to NPM shortly.
Hi,
I'm using 2.4.1 and still have this issue. It adds a white background to PNG's with transparent background @ericnograles.
@jz222 huh strange, pretty sure I tested it. Did you set the mimeType to image/png
? By default, if nothing is specified, the library assumes image/jpeg
which will give your PNG a white background by design.
When processing a PNG with transparency, the transparency is removed and replaced with a white background, even when the mimeType is set to PNG in the config.
This seems to be caused by the fix for https://github.com/ericnograles/browser-image-resizer/issues/42, PNGs retain their transparency in the previous version.