Attachment Storage Saver: PDF Compression, Image Compression, Filestore Cleanup and Storage Analytics
by Viyug Infotech https://viyuginfotech.com$Â 64.65

Shrink the filestore without risking a single document.
Storage Saver recompresses scanned PDFs and photos inside Odoo, shows where your storage goes, and keeps every original until the new file is verified. Dry run first, undo in one click, before/after report for every run.
Free setup call with every purchase
After you buy, book a free 30-minute online call: we install the app with you and set it up for your company. Questions are answered within 24 hours, Monday to Saturday, at support@viyuginfotech.com or on WhatsApp (QR code at the end of this page).
Why the filestore keeps growing
Odoo already shares identical files and resizes product images, but scanned PDFs and photos attached to documents are kept exactly as uploaded.
Scans pile up
Vendor bills, delivery notes and contracts scanned at 300 dpi weigh 1-3 MB a page, for years.
Phone photos
Site, damage and product photos arrive at 4000 px and 3-8 MB each through the chatter and e-mail.
Slow, costly backups
Every backup, staging copy and restore carries the whole filestore; hosting plans run out.
Nobody dares to delete
Files are evidence. Shrinking them must never lose or damage a single document.
How it works
Four steps, each one reversible until you release the originals.
Measure
Dashboard and analytics show which documents, file types and years take the space.
Dry run
Estimate the saving on a sample. Nothing is written; the projection covers all matching files.
Compress
Background batches. Each result is verified before it replaces the file; the original is kept.
Release or undo
Restore any file in one click while originals are kept; they are checked again before release.
What you get
PDF scans in pure Python
Pictures inside PDFs are downscaled to the resolution you choose and re-encoded; text, fonts, forms, bookmarks and metadata stay as they are. Uses the PDF library and Pillow that Odoo already ships.
Photos and PNG images
JPEG photos are turned upright, resized and re-encoded with their colour profile; PNG files are optimised without loss.
Dry run with projection
Try the settings on a sample first: before and after sizes per file and the projected saving on every matching file, without writing anything.
Originals kept and verified
The new file is read back from the disk and compared by SHA-1; every PDF object except the pictures must stay byte for byte identical. Any doubt: rolled back, original untouched.
One-click undo
Restore one file or a whole run while originals are kept. Restored files are never compressed again; a file changed after compression is never overwritten.
Protected documents
Digitally signed, encrypted, PDF/A and e-invoice PDFs (Factur-X, ZUGFeRD) and e-signature documents are left alone. Binary-field files are excluded by default.
Shared files handled
Odoo stores identical files once; every attachment pointing to the same file is compressed together, so the old file really disappears.
Storage analytics
Pivot and graph of attachment storage per document type, file type, year, location and company, plus a list of the largest files.
Orphan filestore files
Finds files that no attachment points to (Odoo never cleans those). Quarantine first, restore at any time, delete for good later.
Before / after report
A PDF per run: totals, saving per document type, largest savings and why files were left alone.
Nightly policies
New matching files are compressed every night; kept originals are checked once more and released when their keeping period ends.
Tiered archive to Cloud Drive
With Viyug Cloud Drive installed, files older than N days move to your own drive once their drive copy is verified; Odoo keeps the link.
Workflow walkthrough
From the first look at your storage to the before/after report, on a demo database with fictional companies.
See where the storage goes
Storage Saver > Dashboard. Files in Odoo, the filestore on disk, the database, the split by PDF and images, what can still be compressed, what was saved and how many originals are still kept. The largest document types are listed with their size.

Analyse per document and file type
Analytics opens a pivot of every attachment: rows per document (contacts, invoices, tasks...), columns per file type, size in MB and file count. Filter by location (filestore or database) or company.

Follow the growth per year
The graph view stacks the storage per upload year and file type, so you see which years of scans are worth compressing first.

Pick the heaviest files by hand
The Largest files list sorts attachments by size. Select some and use Actions > Compress with Storage Saver for a quick dry run or compression of just those files.

Set a policy
A policy says which files (PDF, JPEG, PNG, size, age, documents) and how strong: Light 200 dpi, Balanced 150 dpi, Strong 110 dpi or your own resolution and quality. Grey scans can be stored in greyscale.

Choose the safety rules
Minimum saving per file, protection of PDF/A and e-invoices, how long originals are kept, and whether the policy runs every night. Signed and encrypted PDFs are always left alone.

Run a dry run first
The dry run compresses a sample in memory only. It shows the size before and after, the saving and the projected saving on all matching files. Nothing is written.

Compress in the background
Compress these files starts a background run with progress, pause and resume. It pauses by itself when the disk gets full. In the demo, scans and photos shrank by about 80 %.

Check every file
Each file has its outcome: compressed with original kept, skipped with the reason (no pictures, e-invoice protected, saving too small) or restored. Filter and group by status, model or reason.

Proof for each file
The file shows its checksums before and after, the pictures re-encoded, the kept original and until when it is kept. Download the original or open the document.

Undo in one click
Restore original puts the exact original back (checksum checked) and the file is never compressed again. A run can also be restored as a whole.

Before / after report
Print the report of a run for your IT or auditor: totals, saving per document type, the largest savings and the files left untouched with the reason.

Clean orphan filestore files
Scan the filestore for files no attachment points to. Move them to quarantine, restore them, or delete them for good after a while. Only settings administrators can do this.

Archive old files to your own drive
With Viyug Cloud Drive installed, a policy can move files older than N days to your drive once the drive copy is verified. Odoo keeps the link, so people open them as before.

Setup in 5 steps
Install
Install the app; administrators get the Storage Saver Administrator role, others can be given Viewer.
Look
Open the dashboard and analytics to see what takes the space.
Policy
Adjust the default policy: file types, minimum age, level, how long originals are kept.
Dry run
Run a dry run and check a few files and the projected saving.
Compress
Compress, check the report, and switch on Run every night.
Compared with typical alternatives
| Feature | This app | Typical alternatives |
|---|---|---|
| PDF scans compressed in pure Python (no Ghostscript, no external service) | Yes | Often needs Ghostscript or a cloud API |
| Dry run with projected saving | Yes | Rare |
| Originals kept, verified and restorable | Yes | Usually replaced at once |
| Every PDF object except pictures checked byte for byte | Yes | No |
| Signed, encrypted, PDF/A and e-invoice PDFs protected | Yes | Partly |
| Files shared by several attachments compressed together | Yes | Partly |
| Photos (JPEG, PNG) in the same policy | Yes | Separate module |
| Storage analytics per document, file type, year | Yes | No |
| Orphan filestore files with quarantine | Yes | No |
| Before / after PDF report | Yes | No |
| Archive old files to your own drive | With Viyug Cloud Drive | No |
Frequently asked questions
Will my documents still look the same?
Text, fonts, tables, forms and bookmarks are not touched; only pictures inside PDFs are re-encoded. At Balanced (150 dpi) scans stay sharp on screen and on paper. Start with a dry run and open a few files.
When is the disk space freed?
While originals are kept (14 days by default) both versions exist. When they are released, the original files are removed by Odoo's own file clean-up, usually the same night.
What if something goes wrong while writing?
Each file is written in its own database savepoint, read back from the disk and compared with the verified result. On any difference the change is rolled back and the file is marked failed and left untouched.
Does it work on Odoo.sh and Odoo Online?
It works on Odoo.sh and on your own servers: it only uses Python libraries Odoo already requires. Odoo Online does not allow custom apps.
Are legal or signed documents safe?
Digitally signed and encrypted PDFs and e-signature documents are never changed; PDF/A and e-invoices are protected by default. If your country requires unaltered originals for some documents, exclude those documents in the policy.
Is anything sent outside my server?
No. Everything runs inside Odoo. Cloud Drive archiving only uses the drives you connected.
Can I stop it?
Pause and resume a run at any time; it continues where it stopped. It also pauses itself when less than 500 MB is free on the filestore disk.
Works with
Viyug Cloud Drive
Optional. Moves attachments to your own storage (folder, NAS, S3, SFTP, Google Drive, Dropbox) with folder rules and verified offload. With both apps, a Storage Saver policy can archive files older than N days to the drive. Find it on the Odoo Apps Store under the technical name viyug_cloud_drive.
Questions or a custom need?
Email support: support@viyuginfotech.com
Website: viyuginfotech.com
Scan with your phone to chat on WhatsApp or write us an email:

+91 83207 42187

Send us an email
Release notes: 1.0 - first release.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 2557 |
| Technical Name |
viyug_storage_saver |
| License | OPL-1 |
| Website | https://viyuginfotech.com |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module