Skip to content
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

jpg image is not replaced #14

Open
thamaraikrishnan opened this issue Mar 5, 2016 · 3 comments
Open

jpg image is not replaced #14

thamaraikrishnan opened this issue Mar 5, 2016 · 3 comments

Comments

@thamaraikrishnan
Copy link

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

@psliwa
Copy link
Owner

psliwa commented Mar 6, 2016

Thanks for reporting an issue. What jpegtran and jpegoptim versions do you have?

@thamaraikrishnan
Copy link
Author

Server : CentOS release 6.7 (Final)
jpegtran version : 1.2.1
jpegoptim version : v1.4.3

@andertun
Copy link

Did any of you find a solution to this? I don't have the problem when I upload the image as file to the server. But when I change my frontend implementation to upload the image as a blob, I have this issue.

This is what I do:


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

$optimizer = $optimizerFactory->get();

move_uploaded_file($_FILES['file']['tmp_name'], $dest);
$optimizer->optimize($absRoot . '/' . $dest);

I have paused the debugger right before the optimize(...) call, and the file is looking completely normal in the file explorer, and has .jpg extension. After optimize(...) it's filename ends with .jpg.jgp.

jpegtran: version 8d 15-Jan-2012
jpegoptim: jpegoptim v1.4.4 x86_64-apple-darwin14.5.0 (libjpeg version: 8d 15-Jan-2012)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants