The goal of minimage is to let users minify size images.
The main function allows to compress the images contained in a directory to another directory, optionally changing some compression parameters.
You can install minimage from GitHub with:
# install.packages("devtools")
devtools::install_github("ardata-fr/minimage")
library(minimage)
compress_images("test-files/", "test-new-files/", verbose = FALSE)
compress_images("test-files/", "test-new-files/", png_quality = "90-100",
verbose = FALSE, overwrite = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.