Skip to content

Instantly share code, notes, and snippets.

@perezp44
Created November 16, 2022 12:35
Show Gist options
  • Save perezp44/fc5a3853039fd29ff94c5b8488fea0a1 to your computer and use it in GitHub Desktop.
Save perezp44/fc5a3853039fd29ff94c5b8488fea0a1 to your computer and use it in GitHub Desktop.
script to resize thumbnails for a Quarto blog
#- script para hacer un resize de las imagenes de los posts
my_thumbnail <- here::here("posts", "thumbnails", "thumbnail_01.png")
img <- magick::image_read(my_thumbnail)
img_resized <- img |> magick::image_scale("740x426!")
#- guardo la foto reescalada a 640x427
magick::image_write(img_resized, my_thumbnail)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment