<?xml version="1.0"?>
<kanban string="Product Images" default_order="sequence">
                <field name="video_url" invisible="1"/>
                <field name="sequence" widget="handle"/>
                <templates>
                    <t t-name="card" class="p-0 border-0">
                        <div class="card">
                            <div class="o_squared_image">
                                <field class="card-img-top" name="image_1920" widget="x2_many_image"/>
                            </div>
                            <div class="p-2 m-0 bg-200" t-attf-title="#{record.name.value}">
                                <field name="name" class="small fs-5 text-truncate d-block"/>
                            </div>
                            <!-- below 100 Kb: good -->
                            <t t-if="record.image_1920.raw_value.length &lt; 100*1000">
                                <t t-set="size_status" t-value="'text-bg-success'"/>
                                <t t-set="message">Acceptable file size</t>
                            </t>
                            <!-- below 1000 Kb: decent -->
                            <t t-elif="record.image_1920.raw_value.length &lt; 1000*1000">
                                <t t-set="size_status" t-value="'text-bg-warning'"/>
                                <t t-set="message">Huge file size. The image should be optimized/reduced.</t>
                            </t>
                            <!-- above 1000 Kb: bad -->
                            <t t-else="1">
                                <t t-set="size_status" t-value="'text-bg-danger'"/>
                                <t t-set="message">Optimization required! Reduce the image size or increase your compression settings.</t>
                            </t>
                            <span t-attf-class="badge #{size_status} o_product_image_size" t-att-title="message"/>
                        </div>
                    </t>
                </templates>
            </kanban>
        