Community mailing list archives

Re: How to determine the url of a product image ?

Luke Branch
- 10/27/2015 10:02:30
Hi Hieu,

I'm also interested in this but for version 8. I assume a similar method applies for both 8/9.

I need to be able to export the product.product.image URL into a CSV file to be used in Aeroo reports to allow me to create a hyperlink on a product image in a report that points back to the URL of the image on the website.

I have searched for quite a while for a solution for this, but still haven't figured it out yet. I'll post back here if I find anything, however if you find a solution please share it here, as I would be very interested in knowing how you did it.

On Tue, Oct 27, 2015 at 7:34 PM, Hieu Nguyen <> wrote:
Hi everyone,

As I understand, product images are either stored in as binary in the Odoo database or filestore in Odoo 9.
When we use a template like below, Odoo will provide the the correct link to the image, so the web page and the product image will rendered correctly on browsers.
                <span itemprop="image" t-field="product.image" t-field-options='{"widget": "image", "class": "product_detail_img", "alt-field": "name"}'/>

Is there a way to determine a product image url, for example: `/web/image/product.template/534/image?unique=68b87dc` in python code?

I'm writing a module to generate a list of products and their corresponding image links and save it in a text file.


Post to: