-
Improvement
-
Resolution: Fixed
-
Minor
-
2.7, 2.8.3, 2.9
-
MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
-
MOODLE_29_STABLE
-
MDL-46763_keep_jpg_avatars_as_jpg -
Moodle supports user icons in both PNG and JPEG format, depending on how the server is set up.
Currently if both are available everything is saved as PNG.
The size of most user images could probably be drastically reduced if JPEG was the default instead since it's much better than PNG for "photographic" style images.
A quick test suggests the user images could be 2 or 3 times smaller than they are now.
Some images aren't well suited to JPEG compression though and require the lossless compression of PNG. A good rule of thumb would be to save images uploaded as PNG (or GIF) as PNG, and those uploaded as JPEG as JPEG.
When looking at this code I noticed the default quality for JPEG is set to 90, which, assuming the number means what I think it means, is quite high. Possibly tweaking that downwards would be a good idea too.
- caused a regression
-
MDL-50041 Uploading JPEG image doesn't work in badges
- Closed
- has a non-specific relationship to
-
MDL-8817 Add a third larger size for user profile photos for accessibility
- Open
-
MDL-39325 Allow Profile Picture Size to be configurable.
- Closed
-
MDL-37588 User Pictures aka Avatars
- Closed
- has been marked as being related by
-
MDL-11000 Profile does not support transparent PNG images properly
- Closed