How do I do a function similar to the following, but in Javascript?
// PHP file
<?php
$path = 'images/imagen.png';
$type = pathinfo($path, PATHINFO_EXTENSION);
$data = file_get_contents($path);
$base64 = 'data:image/' . $type . ';base64,'...
asked by
27.07.2017 / 00:02