Comments (8)
Which OS you are use? I just updated the package and now it works fine. Look in my install script:
- wget http://de.archive.ubuntu.com/ubuntu/pool/universe/p/pngquant/pngquant_2.5.0-1_amd64.deb
- sudo dpkg -i pngquant_2.5.0-1_amd64.deb
- wget https://launchpad.net/ubuntu/+archive/primary/+files/gifsicle_1.88-1_amd64.deb
- sudo dpkg -i gifsicle_1.88-1_amd64.deb
- wget https://launchpad.net/ubuntu/+archive/primary/+files/jpegoptim_1.4.3-1_amd64.deb
- sudo dpkg -i jpegoptim_1.4.3-1_amd64.deb
# - sudo apt-get install -y pngquant gifsicle jpegoptim (not usable OS is old in travis)
- pngquant --version # 2.5.0 (June 2015)
- jpegoptim --version # jpegoptim v1.4.3 x86_64-pc-linux-gnu (libjpeg version: 8d 15-Jan-2012)
- gifsicle --version # LCDF Gifsicle 1.88
from image-optimizer.
Same issue on my extended package.
https://travis-ci.org/approached/laravel-image-optimizer/jobs/151516271
Can try to give more write rights, like this:
chmod 777 -R /home/koichirose/public_html/dev/system/../assets/images/news/
from image-optimizer.
It works for me if I select "jpegoptim" manually. using the "smart" optimizer automatically select "jpegtran" and that command fails.
from image-optimizer.
I tested this issue for pngquant on Windows 8.1 and CentOS and get:
ImageOptimizer\Exception\Exception
Command failed, return code: 4, command: "D:\ImageOptimization\pngquant.exe" "--force" "--quality 70" "--ext=.png" "--" "D:\Development\PHP\tests\image-optimizer\a.png"
D:\ImageOptimization\pngquant.exe: unknown option -- quality 70
The generated command is wrong but this works fine (removing double quotes for --quality 70
):
"D:\ImageOptimization\pngquant.exe" "--force" --quality 70 "--ext=.png" "--" "D:\Development\PHP\tests\image-optimizer\a.png"
from image-optimizer.
Just encountered this issue also, running PHP from the command line of an AWS server.
from image-optimizer.
I am not able to help if I won't get jpegtran
and other stuff versions. Of course the output (from both: stdout and stderr) of the command generated by the library would be essential as well. @ChristianTheMinery Can you provide such info?
from image-optimizer.
Hi!
Jpegtran optimizer creates command with quoted jpegtran options. Like this "C:\Windows\jpegtran.EXE" "-optimize" "-progressive" "-copy none" "-outfile" "path-to-file" "path-to-file".
It is not works. If i run this command from cmd then jpegtran shows help screen and do nothing. With removed quotes it work well.
from image-optimizer.
Since 2.0.0
version a way of generating command has changed (symfony-process
component is used), so it should not be a problem anymore.
from image-optimizer.
Related Issues (20)
- Uncaught exception 'ImageOptimizer\Exception\CommandNotFound' with message 'Command "jpegoptim" not found.' in /home/mitradecom/vendor/ps/image-optimizer/src/ImageOptimizer/Command.php:42 Stack trace: #0 /home/mitradecom/vendor/ps/image-optimizer/src/ImageOptimizer/CommandOptimizer.php(29): ImageOptimizer\Command->execute(Array) #1 /home/mitradecom/public_html/share42/test.php(20): ImageOptimizer\CommandOptimizer->optimize('/home/mitradeco...') #2 {main} thrown in /home/mitradecom/vendor/ps/image-optimizer/src/ImageOptimizer/Command.php on line 42 HOT 2
- ErrorException in Command.php line 38: Undefined variable: outputLines HOT 2
- Writing custom optimizers HOT 1
- composer install issu HOT 1
- pngquant makes small images larger in rare cases HOT 1
- Change output filename HOT 1
- jpg HOT 1
- Showing psr/log installation error with laravel 5.7 HOT 4
- Does not strip creator and quality comments
- Just can't seem to get it to optimise HOT 1
- JPG image not compressing HOT 1
- Release 1.2.2 not available via composer HOT 1
- Change the log level from "notice" to "error" ? HOT 1
- PNG with Black Background HOT 1
- custom_optimizers and args do not work HOT 2
- Evaluate the lowering of PHP version HOT 1
- image doesn't change HOT 1
- Support for Symfony process ^6.0 HOT 1
- PHP 8 Support HOT 3
- How do I install a driver on my local system
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image-optimizer.