Img optimize#1106
Conversation
|
Thanks @PeterDaveHello for submitting this PR! Saving space is really important for performance, and images are usually one of the biggest culprits. Our team will take a look at this in the next few days and get back to you. |
|
No problem @maya |
|
wouldn't it be better to use something like |
|
@Haroenv try to optimize in every build may waste time, by lossless compression, the optimized images can't be smaller by the same compression, if the origin build process won't touch the images, just copy dist from src, then pre-compression can provide better efficiency, can currently, zopflipng may be the optimizer which has the most highest compression ratio, which spends a long time to compress a png image, so I assume the optimized result of |
|
I take @Haroenv 's suggestion to mean "wouldn't it be better to incorporate |
|
Thanks @PeterDaveHello for this PR. I'd also agree with @Haroenv and @jhfrench that it would be very helpful for us if the process you took to optimize these images would repeatable in our nodejs build process. This would mean we could keep this work consistent when we add new images.
|
|
The problem of zopfli is that it needs a very long time to compress a image, I'm not sure if you would like to wait for hours in each build just because of the image optimization, if the images are not changed so often, there is no need to do that. |
|
I agree that since we will not be changing or adding images in the near future, doing it once should be fine. Question: Is there a way to have something automated only run on newly added images? |
|
@maya There is a way to automate zopfli to only run on newly added (or changed) images. ~~Sorry to beat the Gulp drum...it's just the only tool I know. I'd bet that anything that can be done with Gulp can also probably be done with other build tools.~~Ummm...just kidding (now that I've read the CONTRIBUTING.md and see the project uses Gulp). 😁 |
|
hmmm ... seems this was overwritten by d4c3445 ? |
115 images losslessly optimized via zopflipng and jpegoptim!