This is a fork of add-on by Geoff Lankow
Since the original repo is no longer mantained and became read-only on 28th of December, I've decided to continue my small improvements to this fantastic extension here.
Each time a compatible (JPG/PNG/BMP) image is attached to/inserted into new e-mail the user has the ability to resize the image. The resized image replaces previously inserted / attached one.
Head over to release page and download the xpi. \ If you are using Firefox, you will need to right click on the link and select "Save link as...", otherwise Firefox will try to install the xpi file in Firefox.\ Open Thunderbird, open Add-ons (Tools -> Add-ons and Themes), select "Install Add-on From File..."\ \ and select the downloaded xpi.
After installing the add-on, some options are set by default. Please adjust the options if, for example, you want images to be resized in reply/forward mode.\ \ Each time you attach/insert an image into an email, a small notfication will appear asking if you would like to resize the image(s).\ \ If you select 'Yes', a small window will appear allowing you to set the target dimensions, see the size of the image before and after, etc.\ \ After confirming the resize, the attachments / inline images will be replaced with their resized versions.\
Added new resize algorithm, taken from https://github.com/taisel/JS-Image-Resizer.
It is used by default, to use the previous algorithm please uncheck the corresponding option in the options panel. The new algorithm works with transparent PNGs, while the previous algorithm adds a black background to previously transparent PNGs when resizing them.
Difference in resizing png from https://www.seekpng.com/ima/u2e6w7w7i1a9y3t4/ (1149x1333px) to 200px width
Difference in resizing jpg from https://www.vecteezy.com/vector-art/1957829-tech-background-with-abstract-wave-lines (4900x1960px) to 500px width