Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-50175

Optimize Moodle Image Files

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9
    • 3.1
    • Themes

    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

          Activity

            People

              Unassigned Unassigned
              Usual Peculiar Austin Brashear
              Barbara Ramiro Barbara Ramiro
              Andrew Lyons Andrew Lyons
              Mark Nelson Mark Nelson
              Huong Nguyen, Bas Brands, Mathew May
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                23/May/16