Community mailing list archives

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

- 10/27/2015 11:36:21
is this of any use to you?

<img itemprop="image" class="img img-responsive" t-attf-src="/website/image/product.template/#{}/image{{'' if product_image_big else '/300x300' }}"/>

This is extracted from the product template in website_sale. Next step would be to look in the controller that serves that URL, and you can find that in website/controllers/ look for '/website/image'.

Best regards,

On Tue, Oct 27, 2015 at 11:08 AM, Luke Branch <> wrote:
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:

Post to: