MyBB Community Forums

Full Version: Resizing JPEG images to PNG
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've noticed that when members upload JPEG avatars to my site and they have to be resized, there are noticeable compression artefacts. To combat this, could anyone on here think up a solution for saving the resized image as a PNG instead of a JPEG?

I think a plugin would be the way to go rather than just modifying core files, but I don't know how to go about it. I'm not willing to pay but can be eternally grateful.  Toungue
Have you tried out Mod Pagespeed by Google? https://modpagespeed.com/doc/filter-image-optimize
(2017-01-10, 10:57 PM)dragonexpert Wrote: [ -> ]Have you tried out Mod Pagespeed by Google? https://modpagespeed.com/doc/filter-image-optimize

It looks interesting, but where does that fit in? Do you suggest I don't resize uploaded avatars and let this thing do the work?

I think I'd rather leave things as they are, even if that does mean users daft enough to save their avatars as JPEGs suffer.
I would just let Mod PageSpeed do the work. ModPage speed can resize images, but it also optimizes them so it means less data usage for your visitors and can also cache the data. You can control if quality is affected.
(2017-01-11, 11:32 AM)dragonexpert Wrote: [ -> ]I would just let Mod PageSpeed do the work. ModPage speed can resize images, but it also optimizes them so it means less data usage for your visitors and can also cache the data. You can control if quality is affected.

Letting mod_pagespeed do the compression instead of MyBB just isn't what I'm looking for at the moment.

Now editing functions_image.php and will just ask for help in another board since it appears to be a case of just changing imagejpeg to imagepng on line 139 but it's failing. Anyway, thanks for your suggestion.