I noticed that the build for the pdf version of the atlas was failing. This is because thebrisbane-environment.Rmd file contains markdown syntax for inserting images that are referenced using a web address. Although you can insert images using standard markdown formatting for files in the repository (e.g. assets/misc/missing.png), this doesn't work for files that are referenced using web addresses (e.g. https://c1.staticflickr.com/5/4844/32017618618_e7419de4c1_b_d.jpg).
To address this, I've created a render_image function that can be used to insert images (and also captions). This function can handle images that are stored in the repository (e.g. assets/misc/missing.png) and also images that are accessed via a web address (e.g. https://c1.staticflickr.com/5/4844/32017618618_e7419de4c1_b_d.jpg). Moving forward, I would recommend that all images be referenced using this function (with exception to species profile images that should continue to be inserted using the dedicated render_species_profile function). I've also updated the brisbane-environment.Rmd file so that it now uses this to refer to the images (e.g. render_image("https://c1.staticflickr.com/5/4844/32017618618_e7419de4c1_b_d.jpg", caption = "Typical dense rainforest habitat. Photo by Louis Backstrom, Lawton Rd, 8 Apr 2018")). Note that, similar to the render_species_profile function, this will need to be specified usig three backticks (see here for example).
Does that make sense? If not, please let me know if you have any questions. I don't have time to do this right now, but if someone could please update the wiki with this information that would be fantastic.
I noticed that the build for the pdf version of the atlas was failing. This is because the
brisbane-environment.Rmd
file contains markdown syntax for inserting images that are referenced using a web address. Although you can insert images using standard markdown formatting for files in the repository (e.g.assets/misc/missing.png
), this doesn't work for files that are referenced using web addresses (e.g.https://c1.staticflickr.com/5/4844/32017618618_e7419de4c1_b_d.jpg
).To address this, I've created a
render_image
function that can be used to insert images (and also captions). This function can handle images that are stored in the repository (e.g.assets/misc/missing.png
) and also images that are accessed via a web address (e.g.https://c1.staticflickr.com/5/4844/32017618618_e7419de4c1_b_d.jpg
). Moving forward, I would recommend that all images be referenced using this function (with exception to species profile images that should continue to be inserted using the dedicatedrender_species_profile
function). I've also updated thebrisbane-environment.Rmd
file so that it now uses this to refer to the images (e.g.render_image("https://c1.staticflickr.com/5/4844/32017618618_e7419de4c1_b_d.jpg", caption = "Typical dense rainforest habitat. Photo by Louis Backstrom, Lawton Rd, 8 Apr 2018")
). Note that, similar to therender_species_profile
function, this will need to be specified usig three backticks (see here for example).Does that make sense? If not, please let me know if you have any questions. I don't have time to do this right now, but if someone could please update the wiki with this information that would be fantastic.