Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] base: fix autoresize and exclude gif
Odoo may resize attachment image with side larger than 1920 pixels. But for animated gifs, this resizement seems to in general increase size file which is not what we want (in some case making it grow from 3MB to 60 MB). So with this change, we only resize and optimize images that are not gifs. Reasoning: pillow doesn't seem to resize GIF (and seems to only increase their size, especially animated GIF, because each frame is not optimized) so we should just not touch them. Note: - currently tiff were not resized (because of a mimetype typo) - currently image dimensions were not resized (from our test, resizing on the dimension does not change the size much, quality is most important). both of these issue have been solved in this commit. opw-2897291 closes odoo#96307 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
- Loading branch information