[wp-trac] [WordPress Trac] #58996: Consider removing the "imagemin" task from Grunt
WordPress Trac
noreply at wordpress.org
Fri Aug 11 15:30:58 UTC 2023
#58996: Consider removing the "imagemin" task from Grunt
-----------------------------------+---------------------
Reporter: azaozz | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.4
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+---------------------
Changes (by desrosj):
* keywords: => has-patch 2nd-opinion
Comment:
I'm not sure that relying on "by hand" is the best path here. Even for
experienced contributors and committers, it's very easy to forget steps
like this when it's not often images are added.
It's true that within those two directories images have not been added,
but there have been lots of images added to the `wp-content/themes`
directory. I think it's probably worth looking at expanding the `imagemin`
task to include themes.
I attached a patch that expands to theme directories, and running `npm run
grunt precommit:image` results in 106 images being minified, and seems to
save ~1KB per image within the theme.
The fact that the images within themes can be further minified is a good
example of forgetting to manually perform minifying prior to committing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58996#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list