GithubHelp home page GithubHelp logo

psliwa / image-optimizer Goto Github PK

View Code? Open in Web Editor NEW
902.0 35.0 138.0 671 KB

Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.

License: MIT License

PHP 100.00%
image-optimization php jpegoptim pngquant optipng jpg png gif performance image

image-optimizer's People

Contributors

budnieswski avatar evertharmeling avatar freekmurze avatar hellofarhan avatar jean85 avatar lkorth avatar niels3w avatar onexhovia avatar overtrue avatar psliwa avatar samarrizvi avatar thibaultvlacich avatar umpirsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

image-optimizer's Issues

Update Symfony deps

Hello!
I am trying to use this package with Laravel 5.6 and I can not install it with composer because of Symfony package version. There is a conflict between Laravel deps (which uses symfony/process 4.* for example) and image-optimizer (which can only use 3.* version).
I guess there are no any changes that can break the package so may be you can just safely add ~4.0 to your deps?

php-xml requirement

Hi,

Why is the php-xml or (php-dom which is an alias for php-xml) required and installed in the Vagrantfile?

Command not found

I ran the following command on the server:
sudo apt-get install optipng pngquant pngcrush gifsicle jpegoptim
I ran the example as stated with the ignore_errors flag set to false but I keep getting command not found.

Need Help

Hi I have a wep page named teknocops.com its about technology news in google page speed test it takes 22/100 and all of errors about optimizeing images. I want to setup this to optimze my images but i dont know how can i setup i have realy poor knowledge about composers and other things if you want to help me just mail me [email protected] or skype mahirozdin_1

Wrong behavior when choosing jpeg optimizer

When you have installed only jpegoptim on your system there are no ability to optimize your images due to wrong choose algorithm.
In documentation you said: "first of two optimizations will be executed: jpegtran or jpegoptim", but in the code:

$this->optimizers['jpeg'] = $this->optimizers['jpg'] = new ChainOptimizer(array(
            $this->unwrap($this->optimizers['jpegtran']),
            $this->unwrap($this->optimizers['jpegoptim']),
        ), true);

There are new instance of ChainOptimizer with $executeFirst=true and when it optimize (with my comments)

public function optimize($filepath)
    {
        foreach($this->optimizers as $optimizer) { // get first optimizer (jpegtran) which wasn't installed
            $optimizer->optimize($filepath); // try to optimize image with it

            if($this->executeFirst) break; // break due to $this->executeFirst = true
        }
    }

And we have no chance to change the order of optimizers.
I can send a pull request for you, but which decision i have to choose: allow user to set up optimizers by hands or check optimizer availability in OS

Is this library still maintained ?

Hello,
I need to do some image optimizations for a project and this library seems to be suited for this purpose but I wonder if it's still maintained since the last commit date one year ago.

Help with image-optimizer

Dear sir,

I installed all the needed libraries on Centos 6.
If i open the file OptimizersTest.php, i get a blank screen, no errors, but the size of images in folder Resources are not changed.

And than i am lost how to use the image-optimizer.
This will give the error:
Fatal error: Class 'ImageOptimizer\OptimizerFactory'

`<?php
namespace ImageOptimizer;

use ImageOptimizer\Exception\Exception;
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'PHPUnit/Autoload.php';
$factory = new \ImageOptimizer\OptimizerFactory();
$optimizer = $factory->get();
$filepath = 'Resources/sample.jpg';
$optimizer->optimize($filepath);
?>`

Help would be appreciated.

Kind regards,

Steven

Change the log level from "notice" to "error" ?

Hello there! I recently started using your library, and at first I was quite surprise to have my images not being optimized as I expected and nothing showed up in my command (I passes a \Symfony\Component\Console\Logger\ConsoleLogger instance to \ImageOptimizer\OptimizerFactory as a second argument).

Then I digged into the code and realized that you transform every Exception being thrown into a Logger::notice(). Which only shows up if you have at least the --verbose/-v flag. Then I got some output stating that one of my option was wrong and I could fix it.

However, as these are errors (Exceptions), I think the intuitive/expected behavior would be to display them even without verbose, which is the case when using Logger::error().

What do you think ? Any specific reason why you used notice instead from the get go ?

Showing psr/log installation error with laravel 5.7

I am trying to install in laravel 5.7 but its showing psr/log error and not supporting latest psr/log package.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for ps/image-optimizer ^1.2 -> satisfiable by ps/imag   e-optimizer[1.2.0].
    - Conclusion: remove psr/log 1.1.0
    - Conclusion: don't install psr/log 1.1.0
    - ps/image-optimizer 1.2.0 requires psr/log 1.0.* -> satisfiable by psr/log[1.0.0, 1.0.1, 1.0.2].
    - Can only install one of: psr/log[1.0.0, 1.1.0].
    - Can only install one of: psr/log[1.0.1, 1.1.0].
    - Can only install one of: psr/log[1.0.2, 1.1.0].
    - Installation request for psr/log (locked at 1.1.0) -> satisfiable by psr/log[1.1.0].


Installation failed, reverting ./composer.json to its original content.

Suggestion: add vendor name to namespace

Right now the namespace of this package is ImageOptimizer. Changes are low, but it's possible that this namespace could conflict with the namespaces used in the projects it is installed upon.

To lower these changes a very high percentage of packages add the vendor name to the namespace. In you case you base namespace would be Psliwa\ImageOptimizer.

If you would use psr-4 autoloading instead of the deprecated psr-0 all sources could reside in the src directly.

Obviously renaming the base namespace is a breaking change, so you would have to tag a new major version. In my opinion this is worth it.

If you want I could quickly a whip up a PR that makes the necessary changes.

Libraries

Hi,

Do I have to own libraries (pngquant...) on my server when I want to use your lirbary, or do you included it into your library?

Thanks.

JPG image not compressing

I am try to optimize the jpg image with below code but its not compressing. I tried with direct putty command with -m40 and its working but with this package i think its not taking -m40 in command.

$factory = new \ImageOptimizer\OptimizerFactory(array(
                                'ignore_errors' => false,
                                'jpegoptim_options' => array('-m40', '--strip-all', '--all-progressive')
                            ));
$optimizer = $factory->get();
$status = $optimizer->optimize($targetFile);

jpegoptim version
jpegoptim v1.4.6 x86_64-redhat-linux-gnu

Cannot find `ExecutableFinder` class

Fatal error: Class 'Symfony\Component\Process\ExecutableFinder' not found in /opt/lampp/htdocs/test/image-optimizer/src/ImageOptimizer/OptimizerFactory.php on line 25

I think this class doesn`t exist or using wrong path,

also OptimizerFactory class using multiple classes inside single namespace

jpg image is not replaced

jpg image is not replaced, new generated image is saved with .jpg extension along with given file name. Ex: (imgone.jpg -> imgone.jpg.jpg)

"Command not found" and open_basedir

get "Command not found" error when use open_basedir restriction.

cannot use is_executable when open_basedir path defined and executable optimizer outside of that path.

pngquant makes small images larger in rare cases

This can also occur to optipng, but it is smart enough to skip the process if the output is larger than the input.

Apparently pngquant also has an option for this via --skip-if-larger, but it is not passed in the defaults in the OptimizerFactory.

Would it be possible to enable this option by default? I can enable it myself, of course, but it would be a more sane default that would improve usage for everyone 😄 .

100% CPU usage

When optimizing an image, my CPU usage skyrockets to 100% (I'm using DigitalOcean's $5/mo plan).

Is this normal? Is there anything I can do to lower the usage other than upgrading my server?

What if I need to optimize uploaded images from 100 users at the same time?

Uncaught ImageOptimizer\Exception\Exception All optimizers failed to optimize the file

My code is bellow (sample.php)

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

require_once 'vendor/autoload.php';

$factory = new \ImageOptimizer\OptimizerFactory(array('ignore_errors' => false));

$optimizer = $factory->get();

$filepath = __DIR__."/test.jpg";

$optimizer->optimize($filepath);
?>

but it appear error

Fatal error: Uncaught ImageOptimizer\Exception\Exception: All optimizers failed to optimize the file: /var/www/html/opt/test.jpg in /var/www/html/opt/vendor/ps/image-optimizer/src/ImageOptimizer/ChainOptimizer.php:40
Stack trace: #0 /var/www/html/opt/vendor/ps/image-optimizer/src/ImageOptimizer/SmartOptimizer.php(32): ImageOptimizer\ChainOptimizer->optimize('/var/www/html/o...')
#1 /var/www/html/opt/sample.php(13): ImageOptimizer\SmartOptimizer->optimize('/var/www/html/o...')
#2 {main} thrown in /var/www/html/opt/vendor/ps/image-optimizer/src/ImageOptimizer/ChainOptimizer.php on line 40

what happen??

Release 1.2.2 not available via composer

Hi there,

just tried to update the package to your last release, which is 1.2.2. But composer update failed with the following message:

  Problem 1
    - The requested package ps/image-optimizer ~1.2.2 exists as ps/image-optimizer[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.2.0, 1.2.1, dev-master] but these are rejected by your constraint.

I quick check at https://packagist.org/packages/ps/image-optimizer revealed, that the 1.2.2 release is missing?!

Could you please check this?

Thanks

Generated command is wrong?

I'm having the following issue on ubuntu (using version 1.0.6):

Fatal error: Uncaught exception 'ImageOptimizer\Exception\Exception' with message
'Command failed, return code: 1, command: /usr/bin/jpegtran '-optimize' '-progressive' '-outfile' '/home/koichirose/public_html/dev/system/../assets/images/news/test_image.jpg' '/home/koichirose/public_html/dev/system/../assets/images/news/test_image.jpg' 1> /dev/null 2> /dev/null'
in /home/koichirose/public_html/dev/vendor/ps/image-optimizer/src/ImageOptimizer/Command.php:46 

Stack trace: #0 /home/koichirose/public_html/dev/vendor/ps/image-optimizer/src/ImageOptimizer/CommandOptimizer.php(29): ImageOptimizer\Command->execute(Array)
# 1 /home/koichirose/public_html/dev/vendor/ps/image-optimizer/src/ImageOptimizer/ChainOptimizer.php(24): ImageOptimizer\CommandOptimizer->optimize('/home/koichirose/pub...')
# 2 /home/koichirose/public_html/dev/vendor/ps/image-optimizer/src/ImageOptimizer/SmartOptimizer.php(32): I in /home/koichirose/public_html/dev/vendor/ps/image-optimizer/src/ImageOptimizer/Command.php on line 46

Running the exact same command without quotes from the command line works fine:

/usr/bin/jpegtran -optimize -progressive -outfile /home/koichirose/public_html/dev/system/../assets/images/news/test_image.jpg /home/koichirose/public_html/dev/system/../assets/images/news/test_image.jpg

I'm running it like this just to test:

$full_path = '/home/koichirose/public_html/dev/system/../assets/images/news/test_image.jpg';
$factory = new \ImageOptimizer\OptimizerFactory(array('ignore_errors' => false));
$optimizer = $factory->get();
$optimizer->optimize($full_path);

jpg

Your library is very good and useful in png images.
but about jpg images tinypng.com make images very optimizer than this library!
is therer any way to have better optimization for jpg?? (like installing an other jpg optimzer )

Change output filename

In some cases we may not want to overwrite the original. Maybe an option could be to change the filename or add a suffix for it?

Error class: Symfony

Hi admin,
I using php phalcon, I had been include this image-optimizer but Error
"Symfony class not found"....

Please help me

'escapeshellarg' -> $escapeShellCmd

Shouldn't

$commandArgs = 0 === count($args) ? '' : ' '.implode(' ', array_map('escapeshellarg', $args));

in Command.php be

$commandArgs = 0 === count($args) ? '' : ' '.implode(' ', array_map($escapeShellCmd, $args));

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

Hi I receive this messsage

Fatal Error
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

Optimization doesn't work

Hello, can you help me? I installed your library using composer, installed all libraries (optipng, etc.), wrote
$factory = new \ImageOptimizer\OptimizerFactory(array('ignore_errors' => false));
But file is not optimized.
I tried:
$filepath = 'Upload/'.$data['name'];
try {
$optimizer->optimize($filepath);
} catch (CommandNotFound $e) {
echo "string";
}

But 'echo "string";' doesn't appear on my screen.

Code styling suggestion

Hi, this package seems awesome.

However, when looking at the source code I see many inconsistencies in how to code is formatted.

Here's a friendly suggestion: use a service like Style CI to automatically make and keep the code style consistent. I've used the service on many packages before and quite happy with it.

If you're happy with how the code is now feel free to ignore this issue.

composer install issu

Hi
When I exec composer "composer require ps/image-optimizer" receive this message :
`Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for ps/image-optimizer dev-master -> satisfiable by ps/image-optimizer[dev-master].
- Can only install one of: ps/image-optimizer[1.2.0, dev-master].
- Installation request for ps/image-optimizer ^1.2 -> satisfiable by ps/image-optimizer[1.2.0].

Installation failed, reverting ./composer.json to its original content.
`

What is The Problem ?!

ErrorException in Command.php line 38: Undefined variable: outputLines

I used this package few month ago, all was going ok. but today, get error

ErrorException in Command.php line 38:
Undefined variable: outputLines

line 38 is: exec($command, $outputLines, $result);

help me check, I don't know why, I don't edit or do anything in my server.

my version is 1.1, using pngquant to optimized

Just can't seem to get it to optimise

Hi All,

I have followed the steps, installed all the correct libraries and tried in both Windows and Linux. I get no errors at all, it just doesn't optimise my images. At first I thought it wasn't finding my images but when I changed the location a non-existent image it then threw an error leaving me at a loss as to why it wouldn't optimise my images.

`require_once (DIR."/vendor/autoload.php");

$factory = new \ImageOptimizer\OptimizerFactory(array('ignore_errors' => false));
$optimizer = $factory->get();
$images = glob("images///*.{jpg,png,gif}", GLOB_BRACE);
foreach ($images as $image) {
$oldFileSize = filesize($image);
$optimizer->optimize($image);
print("Optimised: " . $image . " Saved: ".number_format((1 - $oldFileSize / filesize($image)),2) ."% \n");
}`

Can anyone suggest as to where I may be going wrong (Installed via composer, latest version).

Any help appreciated, it seems like a great library and if I can work out why I'll post my solution here.

Thanks,
Dom

What am I doing wrong?

Hi, I followed the example, and nothing is happening. Libraries are loaded OK, but images (jpg for example) are not reducing its size.
Is there a way to check if I am doing everything right?
My code is:

error_reporting(E_ALL);
ini_set('display_errors', 1);
$loader = require DIR.'/../vendor/autoload.php';
$loader->addPsr4('ImageOptimizer\', DIR.'/ImageOptimizer');
$factory = new \ImageOptimizer\OptimizerFactory(array('ignore_errors' => false));
$optimizer = $factory->get();
$filepath = 'imagen.jpg';
$optimizer->optimize($filepath);
//optimized file overwrites original one

Then, I get the following error: "Fatal error: Uncaught exception 'ImageOptimizer\Exception\Exception' with message 'All optimizers failed to optimize the file: imagen.jpg' "

Thanks in advance!

Does not strip creator and quality comments

I noticed that the optimized images still have the CREATOR and QUALITY comments. "CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 75"

Is there a way these can also be removed?

How to specify quality of the image

Hi, thanks for the awesome library. I'm using jpegoptim. i want to specify the quality of the image when optimizing. Currently arguments are set to --strip-all, --all-progressive. is there a way I can specify the arguments for jpegoptim?

Thanks

PNG with Black Background

I'm using Image-Optimizer within an own addon and everytime i try to optimize an transparent png it gets a black background. Do you have an Idea?

Having issues installing this via Composer with Laravel 5.2

Trying to include this with latest Laravel 5.2 and got the following error. I think it's because Laravel already ships with Symfony Process 3.0 and this package requires ~2.0.

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: don't install ps/image-optimizer 1.0.4
- Conclusion: don't install ps/image-optimizer 1.0.3
- Conclusion: don't install ps/image-optimizer 1.0.2
- Conclusion: don't install ps/image-optimizer 1.0.1
- Conclusion: remove symfony/process v3.0.0
- Installation request for ps/image-optimizer ^1.0 -> satisfiable by ps/image-optimizer[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4].
- Conclusion: don't install symfony/process v3.0.0
- ps/image-optimizer 1.0.0 requires symfony/process ~2.0 -> satisfiable by symfony/process[2.0.4, 2.0.5, 2.0.6, 2.0.7, v2.0.10, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9, v2.3.0, v2.3.1, v2.3.10, v2.3.11, v2.3.12, v2.3.13, v2.3.14, v2.3.15, v2.3.16, v2.3.17, v2.3.18, v2.3.19, v2.3.2, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24, v2.3.25, v2.3.26, v2.3.27, v2.3.28, v2.3.29, v2.3.3, v2.3.30, v2.3.31, v2.3.32, v2.3.33, v2.3.34, v2.3.35, v2.3.36, v2.3.4, v2.3.5, v2.3.6, v2.3.7, v2.3.8, v2.3.9, v2.4.0, v2.4.1, v2.4.10, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7, v2.4.8, v2.4.9, v2.5.0, v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.10, v2.6.11, v2.6.12, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.8.0, v2.8.1].
- Can only install one of: symfony/process[v2.6.0, v3.0.0].
- Can only install one of: symfony/process[v2.6.1, v3.0.0].
- Can only install one of: symfony/process[v2.6.10, v3.0.0].
- Can only install one of: symfony/process[v2.6.11, v3.0.0].
- Can only install one of: symfony/process[v2.6.12, v3.0.0].
- Can only install one of: symfony/process[v2.6.2, v3.0.0].
- Can only install one of: symfony/process[v2.6.3, v3.0.0].
- Can only install one of: symfony/process[v2.6.4, v3.0.0].
- Can only install one of: symfony/process[v2.6.5, v3.0.0].
- Can only install one of: symfony/process[v2.6.6, v3.0.0].
- Can only install one of: symfony/process[v2.6.7, v3.0.0].
- Can only install one of: symfony/process[v2.6.8, v3.0.0].
- Can only install one of: symfony/process[v2.6.9, v3.0.0].
- Can only install one of: symfony/process[v2.7.0, v3.0.0].
- Can only install one of: symfony/process[v2.7.1, v3.0.0].
- Can only install one of: symfony/process[v2.7.2, v3.0.0].
- Can only install one of: symfony/process[v2.7.3, v3.0.0].
- Can only install one of: symfony/process[v2.7.4, v3.0.0].
- Can only install one of: symfony/process[v2.7.5, v3.0.0].
- Can only install one of: symfony/process[v2.7.6, v3.0.0].
- Can only install one of: symfony/process[v2.7.7, v3.0.0].
- Can only install one of: symfony/process[v2.7.8, v3.0.0].
- Can only install one of: symfony/process[v2.8.0, v3.0.0].
- Can only install one of: symfony/process[v2.8.1, v3.0.0].
- Can only install one of: symfony/process[2.0.4, v3.0.0].
- Can only install one of: symfony/process[2.0.5, v3.0.0].
- Can only install one of: symfony/process[2.0.6, v3.0.0].
- Can only install one of: symfony/process[2.0.7, v3.0.0].
- Can only install one of: symfony/process[v2.0.10, v3.0.0].
- Can only install one of: symfony/process[v2.0.12, v3.0.0].
- Can only install one of: symfony/process[v2.0.13, v3.0.0].
- Can only install one of: symfony/process[v2.0.14, v3.0.0].
- Can only install one of: symfony/process[v2.0.15, v3.0.0].
- Can only install one of: symfony/process[v2.0.16, v3.0.0].
- Can only install one of: symfony/process[v2.0.17, v3.0.0].
- Can only install one of: symfony/process[v2.0.18, v3.0.0].
- Can only install one of: symfony/process[v2.0.19, v3.0.0].
- Can only install one of: symfony/process[v2.0.20, v3.0.0].
- Can only install one of: symfony/process[v2.0.21, v3.0.0].
- Can only install one of: symfony/process[v2.0.22, v3.0.0].
- Can only install one of: symfony/process[v2.0.23, v3.0.0].
- Can only install one of: symfony/process[v2.0.24, v3.0.0].
- Can only install one of: symfony/process[v2.0.25, v3.0.0].
- Can only install one of: symfony/process[v2.0.9, v3.0.0].
- Can only install one of: symfony/process[v2.1.0, v3.0.0].
- Can only install one of: symfony/process[v2.1.1, v3.0.0].
- Can only install one of: symfony/process[v2.1.10, v3.0.0].
- Can only install one of: symfony/process[v2.1.11, v3.0.0].
- Can only install one of: symfony/process[v2.1.12, v3.0.0].
- Can only install one of: symfony/process[v2.1.13, v3.0.0].
- Can only install one of: symfony/process[v2.1.2, v3.0.0].
- Can only install one of: symfony/process[v2.1.3, v3.0.0].
- Can only install one of: symfony/process[v2.1.4, v3.0.0].
- Can only install one of: symfony/process[v2.1.5, v3.0.0].
- Can only install one of: symfony/process[v2.1.6, v3.0.0].
- Can only install one of: symfony/process[v2.1.7, v3.0.0].
- Can only install one of: symfony/process[v2.1.8, v3.0.0].
- Can only install one of: symfony/process[v2.1.9, v3.0.0].
- Can only install one of: symfony/process[v2.2.0, v3.0.0].
- Can only install one of: symfony/process[v2.2.1, v3.0.0].
- Can only install one of: symfony/process[v2.2.10, v3.0.0].
- Can only install one of: symfony/process[v2.2.11, v3.0.0].
- Can only install one of: symfony/process[v2.2.2, v3.0.0].
- Can only install one of: symfony/process[v2.2.3, v3.0.0].
- Can only install one of: symfony/process[v2.2.4, v3.0.0].
- Can only install one of: symfony/process[v2.2.5, v3.0.0].
- Can only install one of: symfony/process[v2.2.6, v3.0.0].
- Can only install one of: symfony/process[v2.2.7, v3.0.0].
- Can only install one of: symfony/process[v2.2.8, v3.0.0].
- Can only install one of: symfony/process[v2.2.9, v3.0.0].
- Can only install one of: symfony/process[v2.3.0, v3.0.0].
- Can only install one of: symfony/process[v2.3.1, v3.0.0].
- Can only install one of: symfony/process[v2.3.10, v3.0.0].
- Can only install one of: symfony/process[v2.3.11, v3.0.0].
- Can only install one of: symfony/process[v2.3.12, v3.0.0].
- Can only install one of: symfony/process[v2.3.13, v3.0.0].
- Can only install one of: symfony/process[v2.3.14, v3.0.0].
- Can only install one of: symfony/process[v2.3.15, v3.0.0].
- Can only install one of: symfony/process[v2.3.16, v3.0.0].
- Can only install one of: symfony/process[v2.3.17, v3.0.0].
- Can only install one of: symfony/process[v2.3.18, v3.0.0].
- Can only install one of: symfony/process[v2.3.19, v3.0.0].
- Can only install one of: symfony/process[v2.3.2, v3.0.0].
- Can only install one of: symfony/process[v2.3.20, v3.0.0].
- Can only install one of: symfony/process[v2.3.21, v3.0.0].
- Can only install one of: symfony/process[v2.3.22, v3.0.0].
- Can only install one of: symfony/process[v2.3.23, v3.0.0].
- Can only install one of: symfony/process[v2.3.24, v3.0.0].
- Can only install one of: symfony/process[v2.3.25, v3.0.0].
- Can only install one of: symfony/process[v2.3.26, v3.0.0].
- Can only install one of: symfony/process[v2.3.27, v3.0.0].
- Can only install one of: symfony/process[v2.3.28, v3.0.0].
- Can only install one of: symfony/process[v2.3.29, v3.0.0].
- Can only install one of: symfony/process[v2.3.3, v3.0.0].
- Can only install one of: symfony/process[v2.3.30, v3.0.0].
- Can only install one of: symfony/process[v2.3.31, v3.0.0].
- Can only install one of: symfony/process[v2.3.32, v3.0.0].
- Can only install one of: symfony/process[v2.3.33, v3.0.0].
- Can only install one of: symfony/process[v2.3.34, v3.0.0].
- Can only install one of: symfony/process[v2.3.35, v3.0.0].
- Can only install one of: symfony/process[v2.3.36, v3.0.0].
- Can only install one of: symfony/process[v2.3.4, v3.0.0].
- Can only install one of: symfony/process[v2.3.5, v3.0.0].
- Can only install one of: symfony/process[v2.3.6, v3.0.0].
- Can only install one of: symfony/process[v2.3.7, v3.0.0].
- Can only install one of: symfony/process[v2.3.8, v3.0.0].
- Can only install one of: symfony/process[v2.3.9, v3.0.0].
- Can only install one of: symfony/process[v2.4.0, v3.0.0].
- Can only install one of: symfony/process[v2.4.1, v3.0.0].
- Can only install one of: symfony/process[v2.4.10, v3.0.0].
- Can only install one of: symfony/process[v2.4.2, v3.0.0].
- Can only install one of: symfony/process[v2.4.3, v3.0.0].
- Can only install one of: symfony/process[v2.4.4, v3.0.0].
- Can only install one of: symfony/process[v2.4.5, v3.0.0].
- Can only install one of: symfony/process[v2.4.6, v3.0.0].
- Can only install one of: symfony/process[v2.4.7, v3.0.0].
- Can only install one of: symfony/process[v2.4.8, v3.0.0].
- Can only install one of: symfony/process[v2.4.9, v3.0.0].
- Can only install one of: symfony/process[v2.5.0, v3.0.0].
- Can only install one of: symfony/process[v2.5.1, v3.0.0].
- Can only install one of: symfony/process[v2.5.10, v3.0.0].
- Can only install one of: symfony/process[v2.5.11, v3.0.0].
- Can only install one of: symfony/process[v2.5.12, v3.0.0].
- Can only install one of: symfony/process[v2.5.2, v3.0.0].
- Can only install one of: symfony/process[v2.5.3, v3.0.0].
- Can only install one of: symfony/process[v2.5.4, v3.0.0].
- Can only install one of: symfony/process[v2.5.5, v3.0.0].
- Can only install one of: symfony/process[v2.5.6, v3.0.0].
- Can only install one of: symfony/process[v2.5.7, v3.0.0].
- Can only install one of: symfony/process[v2.5.8, v3.0.0].
- Can only install one of: symfony/process[v2.5.9, v3.0.0].
- Installation request for symfony/process == 3.0.0.0 -> satisfiable by symfony/process[v3.0.0].

Installation failed, reverting ./composer.json to its original content.

Exception when running optimize

Here is the exception I receive with running optimize:

ImageOptimizer\Exception\Exception: Command failed, return code: 1, command: C:^\Program Files^\pngquant^\pngquant.EXE "--force" "--ext=.png" "--" "F:\laragon\www\demo\images\uploads\ec498dcfc950e8df339c81ec73ac70e2b46f87b2.png" in F:\laragon\www\demo\vendor\ps\image-optimizer\src\ImageOptimizer\Command.php

. On the other hand, if I run pngquant "--force" "--ext=.png" "--" "F:\laragon\www\demo\images\uploads\43d67cba7a951378485882e5b515c825943f7d0a.png"directly in shell, it works fine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.