You won't get any image display as output format is PowerPoint. This is not a choice nor a
unimplemented feature. This is because PowerPoint is not able to embed images in a table cell.
That’s a PowerPoint limitation.
see https://davidgohel.github.io/flextable/articles/display.html#limitation-for-powerpoint
I wrote a full example for the sake of reproducibility 
# you need the latest version of flextable that should be on cran soon
# remotes::install_github("davidgohel/flextable")
library(flextable)
library(officer)
library(magrittr)
table2 <- flextable( head(iris, n = 10 )) %>%
compose( j = 1,
value = as_paragraph(
minibar(value = Sepal.Length, max = max(Sepal.Length))
), part = "body") %>% autofit()
read_pptx() %>%
add_slide(layout = "Title and Content", master = "Office Theme") %>%
ph_with_flextable_at(value = table2, left = 1, top = 2) %>%
print(target = "Error.pptx")
In HTML, you will get the following flextable:
But in PowerPoint, images are not displayed:
The solution for that is to use save_as_image function:
table2 <- flextable( head(iris, n = 10 )) %>%
compose( j = 1,
value = as_paragraph(
minibar(value = Sepal.Length, max = max(Sepal.Length))
), part = "body") %>% autofit()
png_file <- tempfile(fileext = ".png")
save_as_image(table2, path = png_file)
dims <- flextable_dim(table2)
read_pptx() %>%
add_slide(layout = "Title and Content", master = "Office Theme") %>%
ph_with(external_img(png_file, width = dims$widths, height = dims$heights), use_loc_size = FALSE,
location = ph_location_type(type = "body") ) %>%
print(target = "no_more_blanck_and_no_more_editing.pptx")