diff --git a/R/as_image.R b/R/as_image.R
new file mode 100644
index 0000000..245ecb1
--- /dev/null
+++ b/R/as_image.R
@@ -0,0 +1,42 @@
+#' Render the table as an format-independent image and use it in rmarkdown
+#'
+#' @description This function generates a temporary png file using `save_kable`
+#' and then try to put it in an rmarkdown document using
+#' `knitr::include_graphics`.
+#'
+#' @param x kable input. Either HTML or LaTeX
+#' @param width Image width in inches. (1 inch = 2.54 cm)
+#' @param height Image height in inches. (1 inch = 2.54 cm)
+#' @param ... Additional arguments passed to save_kable.
+#'
+#'
+#' @export
+as_image <- function(x, width = NULL, height = NULL,
+                     ...) {
+  if (is.null(width) + is.null(height) == 0) {
+    message("Both width and height were defined. Use width only by default. ")
+    height <- NULL
+  }
+
+  temp_png <- tempfile(fileext = ".png")
+  temp_img <- save_kable(x = x, file = temp_png, ...)
+
+  img_dpi <- 300
+
+  if (is.null(width) + is.null(height) <= 1 & is.null(attr(temp_img, "info"))) {
+    warning("You need to install magick in order to use width/height in ",
+            "as_image. ")
+  } else {
+    if (!is.null(width)) {
+      img_dpi <- attr(temp_img, "info")$width / width
+    }
+    if (!is.null(height)) {
+      img_dpi <- attr(temp_img, "info")$height / height
+    }
+  }
+
+  include_graphics(temp_png, dpi = img_dpi)
+  return(NULL)
+}
+
+
diff --git a/R/kable_as_image.R b/R/kable_as_image.R
index 46dbcbc..4876db0 100644
--- a/R/kable_as_image.R
+++ b/R/kable_as_image.R
@@ -45,6 +45,8 @@
                            keep_pdf = FALSE,
                            density = 300,
                            keep_tex = FALSE) {
+  message('kable_as_image is deprecated. Please use save_kable or as_image ',
+          'instead.')
   if (!requireNamespace("magick", quietly = TRUE)) {
     stop('kable_as_image requires the magick package, which is not available ',
          'on all platforms. Please get it installed ',
diff --git a/R/save_kable.R b/R/save_kable.R
index 7870af7..6edc7c4 100644
--- a/R/save_kable.R
+++ b/R/save_kable.R
@@ -49,18 +49,30 @@
 
   # Use webshot if necessary
   if (tools::file_ext(file) %in% c("png", "jpg", "jpeg", "pdf")) {
-    message("Putting together a HTML file...")
     file_html <- paste0(tools::file_path_sans_ext(file), ".html")
+    file.create(file_html)
+    file_html <- normalizePath(file_html)
+    file <- paste0(tools::file_path_sans_ext(file_html), ".",
+                   tools::file_ext(file))
     htmltools::save_html(html_result, file = file_html)
-    message("Converting HTML to ", tools::file_ext(file), "...")
     webshot::webshot(file_html, file, ...)
-    message("Done. ")
     if (tools::file_ext(file) == "pdf") {
       message("Note that HTML color may not be displayed on PDF properly.")
     }
     unlink(file_html)
-    unlink("lib", recursive = TRUE)
+    unlink(file.path(dirname(file_html), "lib"), recursive = TRUE)
+    if (requireNamespace("magick", quietly = TRUE)) {
+      img_rework <- magick::image_read(file)
+      img_rework <- magick::image_trim(img_rework)
+      img_info <- magick::image_info(img_rework)
+      magick::image_write(img_rework, file)
+      attr(file, "info") <- img_info
+    } else {
+      message("save_kable will have the best result with magick installed. ")
+    }
   } else {
+    file.create(file)
+    file <- normalizePath(file)
     htmltools::save_html(html_result, file = file)
     if (self_contained) {
       rmarkdown::pandoc_self_contained_html(file, file)
@@ -68,7 +80,7 @@
     }
   }
 
-  return(file)
+  return(invisible(file))
 }
 
 save_kable_latex <- function(x, file, latex_header_includes, keep_tex) {
@@ -94,16 +106,21 @@
 
   temp_tex_file <- paste0(tools::file_path_sans_ext(file), ".tex")
   writeLines(temp_tex, temp_tex_file, useBytes = T)
-  system(paste0("xelatex -interaction=batchmode ", temp_tex_file))
+  temp_tex_file <- normalizePath(temp_tex_file)
+  file_no_ext <- tools::file_path_sans_ext(temp_tex_file)
+
+  owd <- setwd(dirname(temp_tex_file))
+
+  system(paste0("xelatex  ", temp_tex_file))
   if (!keep_tex) {
-    temp_file_delete <- paste0(tools::file_path_sans_ext(file),
-                               c(".tex", ".aux", ".log"))
+    temp_file_delete <- paste0(file_no_ext, c(".tex", ".aux", ".log"))
     unlink(temp_file_delete)
   }
 
+  table_img_info <- NULL
   if (tools::file_ext(file) != "pdf") {
     table_img_pdf <- try(
-      magick::image_read(paste0(tools::file_path_sans_ext(file), ".pdf"),
+      magick::image_read(paste0(file_no_ext, ".pdf"),
                          density = 300), silent = T)
     if (class(table_img_pdf) == "try-error") {
       stop("We hit an error when trying to use magick to read the generated ",
@@ -112,11 +129,17 @@
            "Otherwise, you may check your magick installation and try to ",
            "use magick::image_read to read the PDF file manually. ")
     }
-    unlink(paste0(tools::file_path_sans_ext(file), ".pdf"))
+    unlink(paste0(file_no_ext, ".pdf"))
     table_img <- magick::image_convert(table_img_pdf,
                                        tools::file_ext(file))
-    magick::image_write(table_img, file)
+    table_img_info <- magick::image_info(table_img)
+    magick::image_write(table_img,
+                        paste0(file_no_ext, ".", tools::file_ext(file)))
   }
 
-  return(file)
+  setwd(owd)
+
+  out <- paste0(file_no_ext, ".", tools::file_ext(file))
+  attr(out, "info") <- table_img_info
+  return(invisible(out))
 }
diff --git a/R/util.R b/R/util.R
index 23a4802..2d91900 100644
--- a/R/util.R
+++ b/R/util.R
@@ -114,7 +114,8 @@
     "\\usepackage[normalem]{ulem}",
     "\\usepackage[normalem]{ulem}",
     "\\usepackage[utf8]{inputenc}",
-    "\\usepackage{makecell}"
+    "\\usepackage{makecell}",
+    "\\usepackage{xcolor}"
   ))
 }
 
diff --git a/R/zzz.R b/R/zzz.R
index 2aa54f0..2014072 100644
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -14,6 +14,7 @@
     usepackage_latex("threeparttablex")
     usepackage_latex("ulem", "normalem")
     usepackage_latex("makecell")
+    usepackage_latex("xcolor")
   }
   auto_format <- getOption("kableExtra.auto_format", default = TRUE)
   if (auto_format) auto_set_format()
