[FIX] website_blog: set better size for img in dynamic blog post snippet
Some templates are rendering the blog post cover in a very blurry way. It was not detected sooner because of a mix of: - The default blog posts img do not go through the `/web/image` route and are not resized down / impacted - Some of the layouts are working fine - For the problematic layouts, the problem gets worse when you select only one or two "Fetched Elements". Steps to reproduce: - Add an image on a blog post (you can just download the one on the PR) - Add a "Blog Posts" dynamic snippet on a page - Select "Card Layout" - By default, you'll see that the image is very blurry. If you select 2 (or 1) instead of 3 fetched elements, it will get even worse. Note that it's like that since forever, when it was introduced with https://github.com/odoo/odoo/commit/3c0d98bcd8adf9325ee3497eb8d25ec7f904d6a5 opw-3771992 opw-3758676 closes odoo/odoo#156962 X-original-commit: 7d817e950f9e7c18a504d8bff04e02efb9d9dbde Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
<a class="s_blog_posts_post_cover flex-grow-0 flex-shrink-0 align-self-baseline position-relative" t-att-href="data['call_to_action_url']" t-att-title="'Read' + data['name']">
|
||||
<t t-call="website.record_cover">
|
||||
<t t-set="_record" t-value="record"/>
|
||||
<t t-set="_resize_height" t-value="128"/>
|
||||
<t t-set="_resize_width" t-value="128"/>
|
||||
<t t-set="_resize_height" t-value="256"/>
|
||||
<t t-set="_resize_width" t-value="256"/>
|
||||
<t t-set="additionnal_classes" t-value="'w-100 h-100 bg-200 position-absolute'"/>
|
||||
</t>
|
||||
</a>
|
||||
@@ -82,8 +82,8 @@
|
||||
<a class="s_blog_posts_post_cover" t-att-href="data['call_to_action_url']">
|
||||
<t t-call="website.record_cover">
|
||||
<t t-set="_record" t-value="record"/>
|
||||
<t t-set="_resize_height" t-value="256"/>
|
||||
<t t-set="_resize_width" t-value="256"/>
|
||||
<t t-set="_resize_height" t-value="512"/>
|
||||
<t t-set="_resize_width" t-value="512"/>
|
||||
<t t-set="additionnal_classes" t-value="'thumb'"/>
|
||||
</t>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user