<span *ngIf="mode == 'edit'" [formGroup]="form">
    <span [core-mark-required]="field.required" class="core-mark-required"></span>
    <core-attachments [files]="files" [maxSize]="maxSizeBytes" maxSubmissions="1" [component]="component" [componentId]="componentId" [allowOffline]="true" acceptedTypes="image"></core-attachments>
    <core-input-errors *ngIf="error" [errorText]="error"></core-input-errors>

    <ion-label stacked>{{ 'addon.mod_data.alttext' | translate }}</ion-label>
    <ion-input type="text" [formControlName]="'f_'+field.id+'_alttext'" [placeholder]=" 'addon.mod_data.alttext' | translate" ></ion-input>
</span>

<span *ngIf="mode == 'search'" [formGroup]="form">
    <ion-input type="text" [formControlName]="'f_'+field.id" [placeholder]="field.name"></ion-input>
</span>

<span *ngIf="mode == 'list' && imageUrl" (click)="gotoEntry.emit(entryId)"><img [src]="imageUrl" [alt]="title" class="core-media-adapt-width list_picture" core-external-content/></span>

<img *ngIf="mode == 'show' && imageUrl" [src]="imageUrl" [alt]="title" class="core-media-adapt-width list_picture" [attr.width]="width" [attr.height]="height" core-external-content/>
