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

PNG and JPEG images are not optimized

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Performance
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Running optipng and jpegoptim (lossless optimization of images) on all of the images in HEAD could give us some significant savings in terms of file sizes.

      I have attached logs for running both of these tools on the Moodle repo:

      find -name "*.png" | xargs -n 10 -P 2 optipng -o7 > optipng.log
      find -name "*.jpg" | xargs -n 1 -P 2 jpegoptim --strip-all > jpegoptim.log

      Some highlights:

      ./theme/cornflower/images/hdbg.jpg 41x112 24bit Adobe [OK] 13047 --> 506 bytes (96.12%), optimized.
      ./theme/cornflower/images/classroomrevolution.jpg 165x25 24bit Adobe [OK] 21437 --> 6826 bytes (68.16%), optimized.
      ./theme/cornflower/images/hdbgend.jpg 41x112 24bit Adobe [OK] 13047 --> 506 bytes (96.12%), optimized.
      Output file size = 2400 bytes (30602 bytes = 92.73% decrease)
      Output file size = 2400 bytes (30602 bytes = 92.73% decrease)
      Output file size = 5700 bytes (44367 bytes = 88.62% decrease)
      Output file size = 5700 bytes (44367 bytes = 88.62% decrease)
      Output file size = 8318 bytes (138486 bytes = 94.33% decrease)
      Output file size = 8047 bytes (136486 bytes = 94.43% decrease)
      Output file size = 2850 bytes (55938 bytes = 95.15% decrease)
      Output file size = 955 bytes (69153 bytes = 98.64% decrease)
      Output file size = 809 bytes (28663 bytes = 97.26% decrease)
      Output file size = 924 bytes (69325 bytes = 98.68% decrease)
      Output file size = 2289 bytes (52590 bytes = 95.83% decrease)

      Here is another tool (firefox extension) that can be used:
      http://developer.yahoo.net/blog/archives/2008/09/smushitcom_opti.html

        Attachments

        1. jpegoptim.log
          4 kB
        2. optipng.log
          1.58 MB

          Issue Links

            Activity

              People

              Assignee:
              francois Francois Marier
              Reporter:
              francois Francois Marier
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10