Try this for attaching image.
File file = getFileStreamPath(EMAIL_TEMP_FILE);
i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
i.setType("image/jpeg");
i.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+file.getAbsolutePath())); //Your image file
Hope it helps.