Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Lines of code | 2179 |
Technical Name |
azk_image_compression |
License | AGPL-3 |
Website | http://www.azka.tech |
Versions | 12.0 13.0 14.0 15.0 16.0 17.0 18.0 |

Introduction
Enables compressing images stored as attachments or in DB for any model.
Key Features
- Compress images based on a set of rules
- Flexible rules for compression:
- By model where images are uploaded
- By mimetype; a regular expression that allows to filter what type of images to compress
- By size; it allows to compress images having a bigger size than the configured size
- Compress attachments newer or older than specific dates
How it Works
- Add Images: Add some image attachments in the models.
In the following example, I selected the employee model in my compression rule. So, I am adding a BMP image there. - Run the compression rule: Go to the corresponding compression rule and run it.
The Images satisfying
these rules should be
compressed.
The system will show a pop up with the details of the compression:
compressed images and total size reduction - Check results:
Go back to the model where the image was uploaded and verify the results.
Download the image and check the size reduction. - File Store:
Notice that upon running a compression rule or when the scheduled action runs them,
the size of the filestore is reduced if Replace All was checked
Configuration
- Configuration: Setup a compression rule
- Select the models where image attachments to be compressed.
-
Set the source format and destination format (NOTE: The source format should be a regular
expression of mimetypes e.g. images/.*bmp.*).
-
Set the optional minimum size of attachment.
-
Set the optional newer than/older than days to compress.
-
Set the quality of the compressed image (value between 0 and 100 where the larger the value,
the higher the compression but the lower the quality)
-
In Odoo, storage is done by content. Thus, if the same image was uploaded twice, it will be
saved on the disk once.
Thus, there is an option to match all similar images, compress them and delete the uncompressed images.
To activate this feature, check the "Replace All" -
If you want the scheduled action to run this compression rule daily, keep it active.
- Select the models where image attachments to be compressed.
-
Compression Rule
-
Scheduled Action
Upon installing the module, a daily scheduled action "Run attachments compression rules" is added automatically
Suggested Apps
Our Services

Odoo
Consultancy

Odoo
Implementation

Odoo
Customization

Odoo
Integration

Odoo
Data Migration

Odoo
Training

Odoo
Support
Please log in to comment on this module