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

Force .jpg file extension on output #8

Open
luboslives opened this issue Aug 28, 2019 · 3 comments
Open

Force .jpg file extension on output #8

luboslives opened this issue Aug 28, 2019 · 3 comments

Comments

@luboslives
Copy link

Hi, great utility. I know you haven't touched it in a couple of years but since guetzli can take in PNGs as a source, simple-guetzli will spit out the converted jpegs as .png files because it's copying the original file name and extension.

Is there an existing way to achieve this or would you consider patching it in? Might have to patch the log checker too? Thanks.

@luboslives
Copy link
Author

In the meantime, Mac users can use this terminal command to rename the files after conversion:

for f in *.png; do mv "$f" "${f%.png}.jpg"; done

@romainmenke
Copy link
Owner

I will try to look into this as soon as possible. I can't remember if there was a reason to keep the original extension, or if this was an oversight.

At the moment I am considering checking the output mime type and applying the correct suffix for said type.

@romainmenke
Copy link
Owner

Should be fixed in the latest release : https://github.com/romainmenke/simple-guetzli/releases/tag/v0.4.0

This will only affect runs that convert to a different directory. If this tool is used to convert images while overriding the originals the original file extension will be kept as is.

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

2 participants