Remove image thumbnail in an input="file" (iOS Sarafi)

Viewed 139

I'm trying to remove/hide an image preview inside an input="file" on mobile safari. It adds a preview after choosing an image. I managed to hide a gray button inside:

[type="file"]::-webkit-file-upload-button {
  width: 0;
  height: 0;
  margin: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  font-size: 0;
  opacity: 0;
}

but the image gets 2px width/height with those styles (2nd screenshot). The "-webkit-appearence: none;" property does not help. Does anybody know how to fully hide that image preview?

With button and image by default

With added -webkit-file-upload-button styles

0 Answers
Related