binary - PHP: How to convert an image from URL to Base64? -
i want convert image url base64.
do want create data url? need mime-type , other additional information (see wikipedia). if not case, simple base64 representation of image:
$b64image = base64_encode(file_get_contents('path/to/image.png')); relevant docs: base64_encode()-function, file_get_contents()-function.
Comments
Post a Comment