How to convert JPG to PNG on upload in WordPress (via add_image_size)?

761 Views Asked by At

I asked this some days ago already over here at wordpress.stackexchange.com but didn't get any response since – so I thought it would be legit to ask over here again:

I am looking for a way to have one of the additional images sizes saved as PNG. Ideally the PNG-Version would be rendered on upload and defined through add_image_size.

So far I have only found one WP-plugin that has the built in capability of converting JPGs to PNGs (EWWW Image Optimizer) but it does not really provide the functionality I'm looking for.

I know this should be possible through the PHP function imagecreatefromjpeg – but currently I just don't know where / how to hook that into add_image_size or wherever taht should be hooked in.

I hope somebody has done this before? Any pointers / suggestion appreciated. Thank you!

0

There are 0 best solutions below