Skip to content

Instantly share code, notes, and snippets.

@koficoud
Last active May 5, 2022 20:22
Show Gist options
  • Save koficoud/ab349ffb68d470014fd34959579620ed to your computer and use it in GitHub Desktop.
Save koficoud/ab349ffb68d470014fd34959579620ed to your computer and use it in GitHub Desktop.
Formulario básico para previsualizar imagen
<form>
<!-- este elemento se llenará dinámicamente con la imagen cargada en el input -->
<div id="preview"></div>
<!-- con el atributo accept nos aseguramos de que solo se cargue una imagen -->
<input type="file" accept="image/*" id="image" />
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment