<?xml version="1.0" encoding="utf-8"?>
 <templates id="template" xml:space="preserve">
    <t t-name="web.ContactImageField" t-inherit="web.ImageField" t-inherit-mode="primary">
        <xpath expr="//div[hasclass('o_image_uploader_container')]" position="attributes">
            <attribute
                name="t-attf-class"
                remove="bottom-0"
                add="{{containsValidImage ? 'bottom-0' : 'top-50 start-50 translate-middle z-1'}}"
                separator=" "/>
        </xpath>
        <xpath expr="//button[hasclass('o_select_file_button')]" position="attributes">
            <attribute name="t-if">containsValidImage</attribute>
        </xpath>
        <xpath expr="//button[hasclass('o_select_file_button')]" position="after">
            <button t-else="" class="btn border-0 d-flex justify-content-center align-items-center w-100">
                Add Photo
            </button>
        </xpath>
    </t>
 </templates>
