Search Here

Dynamically Resize Image (On Save or Write) in Odoo14

 In this article, you will learn how to dynamically resize images on Creating (Saving) or updating (Existing) records in Odoo14. One point to be noted here is that the "image_resize_image" function (to resize an image) has been excluded from Odoo14, it only works with Odoo8.

Dynamically Resize Image (On Save or Write) in Odoo14,Image resize width, height,odoo.tools.ImageProcess,resize(),image_base64(),base64,Save Resize

How to Resize Image Dynamically on Create and Write Event

Read More: How to Resize Image in Odoo8

Enjoy Free Tools: Get Free Online Image Resize Tool 

Below are the steps to resize an image

  1. Convert base64 encoded image into image (to resize an image) by using odoo.tools.ImageProcess
  2. Apply resize() function (How Python Function Works) on above processed image
  3. Convert resized image into base64 encoded format by using, image_base64()
Read More: How to Create Image Field in Odoo

Post a Comment

0 Comments