hi i want to upload 4K image to to prevent odoo to resize my image on binary fields
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Projet
- MRP
Cette question a été signalée
To change the limit of image size in Odoo, you can modify the max image size setting in the configuration file or modify the database column to accept larger images. Here's how you can do it:
- Modify the max image size setting in the configuration file:
- Locate the Odoo configuration file (odoo.conf) in the Odoo server directory.
- Add the following line to the file: limit_memory_hard = 2147483648 (2GB)
- Save the file and restart the Odoo server.
- Modify the database column to accept larger images:
- Log in to Odoo as an administrator.
- Go to the Settings menu and select Technical > Database Structure > Fields.
- Find the binary field that you want to modify and click on it to open the field properties.
- Change the size attribute of the field to a larger value (e.g. 4194304 for 4MB).
- Save the changes and restart the Odoo server.
Note that increasing the image size limit may have performance and storage implications, so it is important to consider these factors before making any changes. Also, make sure to back up your database before making any modifications.
Hi, I think your solution is focused on increasing filesize in MB, but I guess the question here and mine too, is how to increase resolution limit at conversion upon uploading for all images from current limit 1920px x1080 to say 2560x 1440px...no matter the filesize..?
By default, Odoo automatically resizes uploaded images to a maximum resolution of 1920x1920 (source: https://github.com/odoo/odoo/blob/18.0/odoo/addons/base/models/ir_attachment.py#L334). If you want to change or remove this limit, follow these steps:
- Activate Developer Mode in Odoo.
- Go to: Settings → Technical → Parameters → System Parameters.
- Create or update the following parameter:
- Key: base.image_autoresize_max_px
- Value:
- 0 → Disables resizing (allows any size)
- 2560x1440 → Sets a custom max resolution (e.g., 2560x1440)
- Save changes and test by uploading a larger image.
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire