Encode: file to data URI
The tool reads the selected image with the browser's FileReader API, which returns the file's bytes as a base64-encoded string via readAsDataURL. It reads the file's detected MIME type from the file object and prefixes the base64 text with data:<mime-type>;base64, so the result is a complete, self-contained data URI usable directly as an image source.