Is there an alternative to imagemin? #26
Comments
One thing to also keep in mind is that all of imagemin's bundled plugins will work without imagemin core, because they are valid Gulp plugins as well. So if you think most of your assets will be SVG, you can skip including all of There are examples in every official plugin's README, at the end of the "Usage" section. Example: https://github.com/imagemin/imagemin-jpegoptim#usage Looking at our last few projects, they have had mostly SVG and PNG assets. Most of the JPGs we use are for FPO imagery. Occasionally GIFs are used as a fallback for old IE. We could try scaling back to just SVG and maybe PNG and add formats as a project dictates? Ultimately, if we want to continue optimizing PNG, JPG, GIF and SVG by default, I doubt we'll find a smaller solution. But I'd be happy to be proven wrong! |
I like @tylersticka's suggestion of just including dependencies for PNG and SVG. I wonder if image optimization should even be a part of the "core" tasks at all. It may be best to separate it from the task of moving asset files and figure out a more surgical application. Also, some static hosting services have image optimization as part of the deployment process. This might be worth considering: |
Revisiting this issue to say My Official Opinion™ is that we should remove image optimization entirely from these core tasks. The description for this repo says "Gulp tasks that we usually need." But I've now disabled this task in multiple projects because it slows I haven't recommended including SVG spriting in our core tasks because I still believe SVG solutions should be evaluated on a project by project basis. I believe that strategy should extend to image optimization as a whole. |
(And, bonus: It'll probably cut out the majority of |
I have no objection to removing it. On a similar topic, we can probably remove the optimizations from the CSS and JS tasks as well: |
@erikjung I'd ask @mrgerardorodriguez about that one first, I believe we actually used those on a still-in-progress project. But you're right, it's probably a separate topic. |
@tylersticka @erikjung Great point! Yes, this is being used on a project at the moment.
Definitely worth further discussion, though. |
I ask because it makes
npm install
slow andnode_modules
pendulous. It's large in filesize and also slow because there is some compilation that happens.This is so low priority I even hesitate to open a ticket. But I thought I'd ask.
See also imagemin/imagemin#97
The text was updated successfully, but these errors were encountered: