making your image and figure robust in bs4 bookdown

I struggle to find how to make my figures and images perfectly aligned in the center of my book. After looking around, I think I’ve found an adequate solution:

Fold code in bookdown

Following this answer by Sébastien Rochette, we can fold all code chunk in bookdown by Create a js folder in the same directory as your bookdown book Create 3 files in this js folder transition.