<div id ="{{widget}}-upload-widget" class="inline-block image_upload_widget">
    <div class="image_upload_button {{#unless is_editable_by_current_user}}hide{{/unless}}">
        <div class="image-upload-background"></div>
        <span class="image-delete-button" aria-label="{{ delete_text }}" role="button" tabindex="0">
            &times;
        </span>
        <span class="image-delete-text" aria-label="{{ delete_text }}" tabindex="0">
            {{ delete_text }}
        </span>
        <span class="image-upload-text" aria-label="{{ upload_text }}" role="button" tabindex="0">
            {{ upload_text }}
        </span>
        <span class="upload-spinner-background">
            <object class="image_upload_spinner" type="image/svg+xml" data="/static/images/tail-spin.svg"></object>
        </span>
    </div>
    <img class="image-block" src="{{ image }}"/>
    <input type="file" name="file_input" class="notvisible image_file_input"  value="{{ upload_text }}" />
    <div class="image_file_input_error text-error"></div>
</div>

<div id ="{{widget}}-upload-widget" class="inline-block image_upload_widget">
    <div class="image_upload_button {{#unless is_editable_by_current_user}}hide{{/unless}}">
        <div class="image-upload-background"></div>
        <span class="image-delete-button" aria-label="{{ delete_text }}" role="button" tabindex="0">
            &times;
        </span>
        <span class="image-delete-text" aria-label="{{ delete_text }}" tabindex="0">
            {{ delete_text }}
        </span>
        <span class="image-upload-text" aria-label="{{ upload_text }}" role="button" tabindex="0">
            {{ upload_text }}
        </span>
        <span class="upload-spinner-background">
            <img class="image_upload_spinner" src="/static/images/tail-spin.svg" alt="" />
        </span>
    </div>
    <img class="image-block" src="{{ image }}"/>
    <input type="file" name="file_input" class="notvisible image_file_input"  value="{{ upload_text }}" />
    <div class="image_file_input_error text-error"></div>
</div>

Use img tag for tail-spin.svg instead of object tag.
upload_widget: Use img tag for tail-spin.svg instead of object tag.

We use img tag for showing the loading spinner in image_upload_widget
instead of object tag because using object tag gives the following
error "Refused to display 'https://chat.zulip.org/' in a frame because
it set 'X-Frame-Options' to 'deny'." in console.

As mentioned by Anders in czo, this is probably because we’re loading
the SVG using an <object> tag as if it’s totally-not-an-IE3-ActiveX-
control.

Discussed in #issues > loading tail-spin.svg denied by X-Frame-Options.
