This question has been flagged
3023 Views

In Odoo 10 I am facing an issue with meta property og:image. It is not loading a correct image for the product. 

Eg: if product id is 100

and suggested product id is 50.

og image url rendered as web/image/product.template/50/image

It should be web/image/product.template/100/image

here is website_sale.product view related code.
                <t t-set="head">
<!-- Facebook and linkedin sharing data -->
<meta property="og:type" content="website"/>
<meta property="og:url" t-att-content="request.httprequest.url"/>
<meta property="og:image" t-attf-content="#{request.httprequest.url_root}web/image/product.template/#{product.id}/image"/>
<meta property="og:description" t-att-content="product.description_sale"/>
<!-- Twitter sharing data -->
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" t-attf-content="@#{res_company.name}"/>
<meta name="twitter:title" t-att-content="product.name"/>
<meta name="twitter:description" t-att-content="product.description_sale"/>
<meta name="twitter:image" t-attf-content="#{request.httprequest.url_root}web/image/product.template/#{product.id}/image"/>
                </t>

Avatar
Discard
Author

Any help?