-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add resize_images()
function
#26
Comments
Since we already import I like Also, I think it might be better to post process the rendered |
Looks like |
I also just bumped into the |
Oooo very interesting. Though it looks like it requires an API key, which could complicate things. A magick solution would be my preference if we can make it work since we've already imported it. |
Based on this tweet thread, it would be helpful to be able to batch resize all of the images used in making xaringan slides to reduce the final file size of the PDF from
build_pdf()
or any of the otherbuild_*
functions. This should probably be implemented at the .Rmd level and maybe parse through the .Rmd file to look for all image types that can be resized. Template I'm thinking for the function is:Where
max_size
is the max image file size in MB, andimage_types
is the vector containing all image types to search for (the user can add more if they want).Christophe Dervieux gave some suggestions in the tweet for how to do the resizing:
The text was updated successfully, but these errors were encountered: