Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.9
-
MOODLE_29_STABLE
-
MOODLE_31_STABLE
-
MDL-50175-master -
Description
Using optipng, advancecomp, and jpegoptim I am able to losslessly reduce the size of images in the default Moodle install by about 1388KiB.
I used the following commands:
# Optimize PNGs by removing unnecessary data and optimizing filters with optipng then optimizing deflate compression with advdef
|
find -path ./lib -prune -o -type f -iname "*.png" -exec optipng -strip all -o7 {} + -exec advdef -z4 -i50 {} + |
|
# Optimize JPEGs by removing unnecessary data and optimizing encoding with jpegoptim
|
find -path ./lib -prune -o -type f -iregex ".*\.jpe?g$" -exec jpegoptim --strip-all {} + |
I have a commit up on GitHub with the images optimized .
I shyed away from optimizing /lib because I read another feature enhancement on this tracker where a moodle dev didn't like /lib being modified. Additional gains can probably be had by optimizing that directory as well.
Attachments
Issue Links
- blocks
-
MDLSITE-4426 Add image optimisation step to prechecker/release process
-
- Open
-
- has been marked as being related by
-
MDL-49663 Minify SVGs to save half their size
-
- Closed
-