Changes between Initial Version and Version 1 of Ticket #30587, comment 3
- Timestamp:
- 12/03/2014 10:55:09 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30587, comment 3
initial v1 4 4 5 5 > If I remember correctly, the reason we don't touch default themes is that we don't want to compress the screenshots. This seems like something we can write a configuration against. 6 Easy enough, see inline patch: 6 Easy enough, see inline patch: (Edit: Updated to exclude 3rd party Genericons library) 7 7 8 8 {{{ … … 12 12 --- Gruntfile.js (revision 30594) 13 13 +++ Gruntfile.js (working copy) 14 @@ -416,7 +416, 9@@14 @@ -416,7 +416,10 @@ 15 15 cwd: SOURCE_DIR, 16 16 src: [ … … 19 19 + 'wp-includes/js/tinymce/skins/wordpress/images/*.{png,jpg,gif,jpeg}', 20 20 + 'wp-content/themes/twenty*/**/*.{png,jpg,gif,jpeg,svg}', 21 + '!wp-content/themes/twenty*/screenshot.png' 21 + '!wp-content/themes/twenty*/screenshot.png', 22 + '!wp-content/themes/twenty*/**/{Genericons.svg,genericons-regular-webfont.svg}' 22 23 ], 23 24 dest: SOURCE_DIR … … 31 32 With all that said though, all current included themes images are fully optimized with a single exception: 32 33 `src/wp-content/themes/twentyfifteen/genericons/Genericons.svg (saved 62 B - 0%)` 34 35 '''EDIT''': Turns out this is not true, even though running a test of the above patch eight files were actually optimized/minified during the task even though the grunt output stated `(already optimized)`, the eight files are: 36 {{{ 37 src/wp-content/themes/twentyeleven/inc/images/dark.png (already optimized) 38 src/wp-content/themes/twentyeleven/inc/images/light.png (already optimized) 39 src/wp-content/themes/twentyfourteen/images/pattern-dark.svg (already optimized) 40 src/wp-content/themes/twentyfourteen/images/pattern-light.svg (already optimized) 41 src/wp-content/themes/twentythirteen/images/headers/circle-thumbnail.png (already optimized) 42 43 src/wp-content/themes/twentythirteen/genericons/font/genericons-regular-webfont.svg (already optimized) 44 src/wp-content/themes/twentyfourteen/genericons/font/genericons-regular-webfont.svg (already optimized) 45 src/wp-content/themes/twentyfifteen/genericons/Genericons.svg (saved 62 B - 0%) 46 }}} 33 47 34 48 And if I remember correctly before an included theme is shipped/released all images are manually optimized and committed to the repo. … … 47 61 At this stage there may be some improvements by switching to another algorithm then we would switch to this algorithm for all images, not just included themes, we would also then replace the current `grunt-contrib-imagemin` task with the new replacement or replacements. 48 62 49 Recommending this be closed and resolved as 'worksforme' 63 ~~Recommending this be closed and resolved as 'worksforme'~~ 64 65 Adding a patch per the above to minify bundled theme images excluding Genericons 3rd party external library.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)