Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Can I save product pictures on the file system, so not in the database?

By
Bart Criel
on 1/26/15, 7:22 AM 1,277 views

When attaching pictures to products and/or variants, the pictures are AFAIK stored in the database. The database size can get huge if there are a lot of products, or when the products change every year and the old ones need to be preserved for legacy reasons. Is there a way to tell Odoo that it should save the pictures as files on the file system (exact location is a configuration), and not in the database? It would also be nice that, when the same picture is used for multiple products, the picture is only stored once.

 

 

0

Bole

--Bole--
2385
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

Bole
On 1/27/15, 3:20 AM

If you are talking about V7 , yes it is in database... and here is a topic with more info, and solutions for your problem.

If you are using V8, then attachments are stored on fs by default.. .location of stored data is ~/.local/share/Odoo/dbname....
or you can set custom location by adding data_dir = /path/to/locatin in your config file.. 

Hope it helps.. 

Attachments are different than product images added through the product edit form, correct? Aren't the images stored as base64 strings in the product_template table?

Jeff Beidler
on 1/27/15, 6:46 PM

That's what I'm thinking as well: attachments (documents) are stored on the file system with module Document Management or something similar. Product pictures seem to be stored in the database as base64 without alternative. Which makes my point: when you work with 4000+ products and a collection that changes every year, the database size gets enormous without much added value.

Bart Criel
on 2/3/15, 5:18 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/26/15, 7:22 AM
Seen: 1277 times
Last updated: 3/16/15, 8:10 AM