Issue Details (XML | Word | Printable)

Key: MDL-17037
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Francois Marier
Reporter: Francois Marier
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

PNG and JPEG images are not optimized

Created: 28/Oct/08 10:33 AM   Updated: 06/Apr/09 07:34 AM
Return to search
Component/s: Performance
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: 1. Text File jpegoptim.log (4 kB)
2. Text File optipng.log (1.58 MB)


Participants: Francois Marier and Martin Dougiamas
Security Level: None
Resolved date: 06/Apr/09
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
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


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Francois Marier made changes - 28/Oct/08 10:34 AM
Field Original Value New Value
Assignee Martín Langhoff [ martinlanghoff ] Francois Marier [ francois ]
Martin Dougiamas made changes - 28/Oct/08 10:40 AM
Fix Version/s 2.0 [ 10122 ]
Francois Marier made changes - 28/Oct/08 10:51 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Francois Marier made changes - 06/Apr/09 07:30 AM
Resolution Fixed [ 1 ]
Status Resolved [ 5 ] Reopened [ 4 ]
Francois Marier made changes - 06/Apr/09 07:34 AM
Resolution Fixed [ 1 ]
Status Reopened [ 4 ] Resolved [ 5 ]