vec_img_ext = c('png', 'PNG', 'jpg', 'JPG', 'jpeg', 'JPEG', 'tif', 'TIF', 'tiff', 'TIFF')
vec_valid = sapply(vec_img_ext, function(x) {
ext_iter = paste(c('example_image', x), collapse = '.')
verify_image_extension(image_path = ext_iter)
})
all(vec_img_ext == vec_valid)
Run the code above in your browser using DataLab