Function discord::read_image [] [src]

pub fn read_image<P: AsRef<Path>>(path: P) -> Result<String>

Read an image from a file into a string suitable for upload.

If the file's extension is .png, the claimed media type will be image/png, or image/jpg otherwise. Note that Discord may convert the image to JPEG or another format after upload.