-
Notifications
You must be signed in to change notification settings - Fork 33
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
jpegoptim options not running #13
Comments
Hi @travoliti What is the error? Is that just the parameter Try to debug this package to find the excute command. |
Okay, I think I know what's going on, but I don't know why it's happening. This is the original file size of the image: 2,214 KB I found out that the default options for
So I tried running these options manually in the command line ( So the question is, why is it ignoring my |
Any ideas? |
I added a test only just for you: 71bd597 Result with --strip-all:
Result with -m80:
So you can sse, it works well on my machine. Which version are you use for jpegoptim? |
No idea. But you can try to run the tests. Reference: https://travis-ci.org/approached/laravel-image-optimizer/jobs/176700955 |
I tried it again under a different Laravel project, and I still can't get it to work. It seems to just be ignoring my config and using the config options used in the psliwa/image-optimizer package. |
Can you debug your debug your config file: dd(
config('imageoptimizer')
); |
Output looks fine to me:
|
Could it have anything to do with one of these issues? https://github.com/psliwa/image-optimizer/issues?utf8=%E2%9C%93&q=is%3Aissue%20jpegoptim |
I have no idea, why only you has this problem. I cannot reproduce it. |
+1 here ! |
@approached, I just did a test.
I made a dump of the executed commande in the
For the jpg optimization, I got the following commande :
As you can see, the personal config file is currently ignored : my custom options are not taken. EDIT : in fact, it seems that your own default config is not even used. I noticed that you set the |
It seems that a closed issue was already reporting this problem : #4 |
Ok, I think I figured what went wrong.
I realized that if the config was not passed to the
Hopping it will help others. |
@Okipa or use the old-new way like this: $opt = app('Approached\LaravelImageOptimizer\ImageOptimizer'); |
You're right, much better ! |
I think you can close the issue by the way ;) |
I am using jpegoptim. Here is my config:
But when I run the code, the package compresses it using lossless compression (instead of lossy compression (
-m80
) like I set in the config:But when I run the command in the command line, it works fine:
I only have jpegoptim and not jpegtran.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: