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

PNG and JPEG images are not optimized

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.0
    • 2.0
    • Performance
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE

      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

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

            francois Francois Marier (Inactive)
            francois Francois Marier (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.