A graphical tool to convert and optimize JPEG, PNG and WebP images (based on YOGA)
|GitHub| |License| |Discord| |Github Actions| |Black|
YOGA Image Optimizer is a graphical user interface for YOGA Image <https://github.com/wanadev/yoga>
_ that converts and optimizes the size of JPEG, PNG and WebP image files.
.. figure:: ./screenshot.png :alt: YOGA Image Optimizer screenshot
Arch Linux
The package is available on AUR (``yoga-image-optimizer``):
* https://aur.archlinux.org/packages/yoga-image-optimizer
Flatpak (Linux)
A Flatpak package is available on Flathub. This is currently the simplest way to install YOGA Image Optimizer on all major Linux distributions:
Linux (PyPI)
You must install the dependencies on your system first. It can be done via the following command on Debian and Ubuntu::
sudo apt install git build-essential python3 python3-dev python3-pip libgirepository1.0-dev libcairo2-dev pkg-config gir1.2-gtk-3.0
Then install YOGA Image Optimizer with pip::
sudo pip3 install yoga-image-optimizer
**NOTE:** Installing from PyPI will not install ``.desktop`` file and manual page; you will not be able to run the software from your graphical app menu (GNOME Shell etc.).
Linux (source)
You must install the dependencies on your system first. It can be done via the following command on Debian and Ubuntu::
sudo apt install git build-essential python3 python3-dev python3-pip libgirepository1.0-dev libcairo2-dev pkg-config gir1.2-gtk-3.0
Then clone this repository and navigate to it::
git clone https://github.com/flozz/yoga-image-optimizer.git
cd yoga-image-optimizer
Then install YOGA Image Optimizer using pip::
sudo pip3 install .
Finally, you can install the .desktop
file, icons and manual page using the following command::
sudo ./linuxpkg/copy-data.sh /usr
Windows
Download either the portable .zip version or the Windows installer from the releases page:
* https://github.com/flozz/yoga-image-optimizer/releases
Usage
-----
Just type the following command to run YOGA Image Optimizer::
yoga-image-optimizer
You can also give some image files to open::
yoga-image-optimizer image1.png image2.jpeg
**NOTE:** If you installed YOGA Image Optimizer from Flathub, you will have to run the following command instead::
flatpak run org.flozz.yoga-image-optimizer image1.png image2.jpeg
Contributing
------------
Questions
If you have any question, you can:
Open an issue <https://github.com/flozz/yoga-image-optimizer/issues>
_ on GitHubAsk on Discord <https://discord.gg/P77sWhuSs4>
_ (I am not always available to chat, but I try to answer to everyone)Bugs
Please `open an issue <https://github.com/flozz/yoga-image-optimizer/issues>`_ on GitHub with as much information as possible if you found a bug:
* Your operating system / Linux distribution (and its version)
* How you installed the software
* All the logs and message outputted by the software
* etc.
Pull requests
Please consider filing a bug <https://github.com/flozz/yoga-image-optimizer/issues>
_ before starting to work on a new feature; it will allow us to discuss the best way to do it. It is obviously unnecessary if you just want to fix a typo or small errors in the code.
Please note that your code must follow the coding style defined by the pep8 <https://pep8.org>
_ and pass tests. Black <https://black.readthedocs.io/en/stable>
_ and Flake8 <https://flake8.pycqa.org/en/latest>
_ are used on this project to enforce the coding style.
Translate YOGA Image Optimizer
You can help translating it if the software is not available on your language.
To translate YOGA Image Optimizer, you can submit your translations creating a pull request on GitHub.
Do not forget to add your name as the translation of the ``translator-credits`` key (one name per line, email is optional)::
#: yoga_image_optimizer/about_dialog.py:38
msgid "translator-credits"
msgstr ""
"John DOE\n"
"Other TRANSLATOR <[email protected]>\n"
Run the tests
~~~~~~~~~~~~~
You must install `Nox <https://nox.thea.codes/>`__ first::
pip3 install nox
Then you can check for lint error::
nox --session lint
or run the tests::
nox --session test
You can use following commands to run the tests only on a certain Python version (the corresponding Python interpreter must be installed on your machine)::
nox --session test-3.8
nox --session test-3.9
nox --session test-3.10
nox --session test-3.11
nox --session test-3.12
You can also fix coding style errors automatically with::
nox -s black_fix
Build, extract or update build translations
You must install Nox <https://nox.thea.codes>
__ first::
pip3 install nox
To extract messages and update locales, run::
nox --session locales_update
To compile locales, run::
nox --session locales_compile
NOTE: you must have msgfmt
, msgmerge
and xgettext
executable installed on your system to run the above commands. It can be done via the following command on Debian and Ubuntu::
sudo apt install gettext
Want to support this project?
☕️ Buy me a coffee <https://www.buymeacoffee.com/flozz>
__💵️ Give me a tip on PayPal <https://www.paypal.me/0xflozz>
__❤️ Sponsor me on GitHub <https://github.com/sponsors/flozz>
__[NEXT] (changes on master
, but not released yet):
v1.2.4:
v1.2.3:
v1.2.2:
Bug fix:
Translations:
v1.2.1:
Fixes / improvements:
Translations:
v1.2.0:
Interface / user experience:
Fixes / improvements:
concurrent.futures
on Python 3.7 and 3.8
(#32)New translations:
v1.1.2:
New translations:
Updated translation:
v1.1.1:
v1.1.0:
YOGA <https://github.com/wanadev/yoga>
_ updated to v1.1.0:
Added a setting window:
"Optimize" and "Stop" buttons behaviour improved:
Allow to resize images (downscale only, preserve ratio)
Multiselection: multiple files can now be selected and their parameters can be edited all at once (multiselection)
Windows specific changes:
Fixes / improvements:
<Del>
key while an
optimization is in progressUpdated translations:
Note for packagers:
mozjpeg-lossless-optimization <https://github.com/wanadev/mozjpeg-lossless-optimization>
_v1.0.1:
v1.0.0:
[-]
button not removing the chosen imagev0.99.2 (beta):
v0.99.1 (beta):
v0.99.0 (beta):
.. |GitHub| image:: https://img.shields.io/github/stars/flozz/yoga-image-optimizer?label=GitHub&logo=github :target: https://github.com/flozz/yoga-image-optimizer
.. |License| image:: https://img.shields.io/github/license/flozz/yoga-image-optimizer :target: https://github.com/flozz/yoga-image-optimizer/blob/master/COPYING
.. |Discord| image:: https://img.shields.io/badge/chat-Discord-8c9eff?logo=discord&logoColor=ffffff :target: https://discord.gg/P77sWhuSs4
.. |Github Actions| image:: https://github.com/flozz/yoga-image-optimizer/actions/workflows/python-ci.yml/badge.svg :target: https://github.com/flozz/yoga-image-optimizer/actions
.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://black.readthedocs.io/en/stable