disable the default iphone behavior so that when I click on the input

Viewed 20

Using ngx-image-cropper in my angular cordova app, how can I disable the default iphone behavior so that when I click on the input this window will not appear, but immediately open the gallery? Is it possible? The ability to take a photo from the camera is not required.

enter image description here

<input type="file" (change)="fileChangeEvent($event)"

<image-cropper
  [imageChangedEvent]="imageChangedEvent"
  [aspectRatio]="4 / 4"
  [resizeToWidth]="256"
  format="png"
  [hideResizeSquares]="false"
  (loadImageFailed)="loadImageFailed()"
  [roundCropper]="true"
  (imageCropped)="imageCropped($event)"
></image-cropper>

<div class="cropper__preview" *ngIf="!errorFormat">
  <img [src]="croppedImage" />
</div>

1 Answers

I found out that in such cases it is better to use @ionic-native/camera and cast to ngx-image-cropper not with imageChangedEvent, but through imageBase64

Related