twittersize | R Documentation |
Add borders to an image to force an aspect ratio for twitter post, and write it out in png format. Does not resize original image.
twittersize(
path,
aspect_ratio = "16:9",
out_prefix = "twitter ",
border_color = "white"
)
path |
Path to image file |
aspect_ratio |
Desired aspect ratio, Default = "16:9" (single image in tweet). Use "7:8" if tweeting two images. |
out_prefix |
Prepend to name of output image, Default = "twitter" |
border_color |
Border color, Default = "white" |
path to output image
## Not run:
if(interactive()){
twittersize('~/Desktop/image.png')
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.