-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not optimized = no output #3
Comments
Thanks for reporting. But, I cannot confirm the compile abortion for too large images. This plugin can optimize a large image even if it has 12003 x 8035 pixels and 20.4 MB file size. Would you tell me the detailed spec of the image you couldn't optimize? |
Well, sometimes my clients want me to place their pictures to their pages. |
Now I confirmed the compile abortion you ran into. I can solve this problem by checking the However, I do not want to include such a hard coding in my software. Thanks again, @novli. |
Just to chime in from the duplicate issue I filed (sorry again): looking at jpeg-recompress's source code, even checking the exit status won't solve this problem entirely. There are a few instances of |
Recently this plugin has been updated. It includes the major update of jpeg-recompress. |
Looking at the source code of the new jpeg-recompress, by default, it will now copy the original file if recompressing would increase its size. I ran a quick test and it worked as expected. Looks like this issue can be closed indeed! |
I want to add a test for this issue. |
I like the way you think. When I get to work on Monday, I'll see if I can find an image that triggered the bug with the previous version. However, since the new algorithm is supposed to be more efficient, I'm actually assuming that it won't happen anymore. But it's worth a shot. |
I changed the fixture file to the theoretically smallest JPEG file. Thanks again, @timdp. |
Awesome. Happy to help! |
When an image is already optimized or has, for example, 15Mpx dimensions and 0.5Mb filesize, jpeg-compress aborts.
So if I use gulp-imagemin, there's no output image, as exec-buffer throws an error for it.
It would be great, if you pass original image in such cases.
The text was updated successfully, but these errors were encountered: