Your Google Account has a unified storage quota across Gmail™️, Google Drive™️, and Google Photos™️. Although Google Drive and Google Photos allow you to reclaim this space by deleting the files that you don't need anymore, Gmail only allows you to delete the whole message. This is less than ideal since there are many scenarios where you cannot afford to delete the whole message because its contents and metadata are more important than the files attached to them.
This is where the Attachment Manager for Gmail™️ add-on comes in. Once installed, it will reside within your Gmail. While the add-on is running, every time you click on an email or on an email conversation, the add-on will calculate and show you the total amount of space occupied by the files attached on each message. You will then be presented with the option to delete these attached files, while retaining the record and the content of the rest of the email. In order to prevent the accidental deletion of your messages and files, the add-on doesn't directly delete anything. Instead it creates a modified clone of the email but without its attachments, and then moves the original to the Trash Folder. From there, you are able to recover it for 30 days or until you manually empty the Trash. When this happens, the files will get deleted permanently, and the space they used to occupy will once again be available to you.
Installation / Permissions
During the first time you run the add-on, you will be asked to explicitly give it the permissions necessary to run as a Gmail add-on, read your emails, and add emails to your Gmail Inbox. These permissions are necessary for the add-on to function and is done using Google's own implementation of OAuth 2.0. Please note that this process takes place within Google's own servers. We do not ever get access to your password, and at no point we collect or transmit any personal information outside of Gmail.
If you need further clarifications regarding the use of your data, please refer to the Privacy Policy.
Uninstallation
You can uninstall the Add-on by selecting Manage add-on on the Add-on's context menu.
Revoking Permissions
If you want to revoke the permissions given to the Add-on, you can do so by selecting Remove Access from your Google Account's Permissions page: