<div class="uploaded-image-preview input-xxlarge" style={{backgroundStyle}}>
  {{#if showingPlaceholder}}
    <div class="placeholder-overlay" style={{placeholderStyle}}></div>
  {{/if}}
  <div class="image-upload-controls">
    <label class="btn btn-default pad-left no-text {{if uploading "disabled"}}">
      {{d-icon "far-image"}}
      <input class="hidden-upload-field" disabled={{uploading}} type="file" accept="image/*">
    </label>

    {{#if imageUrl}}
      {{d-button
        action=(action "trash")
        class="btn-danger pad-left no-text"
        icon="far-trash-alt"
        type="button"
      }}

      {{d-button
        icon="discourse-expand"
        title="expand"
        type="button"
        class="image-uploader-lightbox-btn no-text"
        action=(action "toggleLightbox")
        disabled=loadingLightbox
      }}
    {{/if}}

    <span class="btn {{unless uploading "hidden"}}">{{i18n "upload_selector.uploading"}} {{uploadProgress}}%</span>
  </div>

  {{#if imageUrl}}
    <a class="lightbox"
       href={{imageCDNURL}}
       title={{imageFilename}}
       rel="nofollow ugc noopener">

      <div class="meta">
        <span class="informations">
          {{imageWidth}}x{{imageHeight}} {{imageFilesize}}
        </span>
      </div>
    </a>
  {{/if}}
</div>
