I'm trying to add a favicon to my R Shiny app and I want to use a local image file so it can run without Internet connectivity. Using the example Emms gave here I've got a program that will display the favicon when it's using the NOAA logo's url. However, when I saved that exact image to my computer, I've not been able to get it to display. I've tried:
- feeding the
href
parameter a complete file path "C:/Users/...favicon.ico" - feeding the
href
parameter only a file path that begins where the current working directory (viewed withgetwd()
) leaves off - putting the downloaded NOAA logo .ico into a folder called "www" and placing it with my project/where my current directory is viewing (I don't know if guidance on folders named 'www' applied to local readings, but I figured I'd try it anyway)
- According to Giancarlo Tamburello's answer on the same page, I tried using this site to encode that same NOAA logo as a Base 64 character string--this required changing the whole function a bit, so that I assigned
rel="icon", href="data:image/x-icon;base64,[my base 64 string]",
andtype="image/x-icon"
Nothing I've done with filepaths (or with the base 64 string) has resulted in anything other than Google Chrome's favicon placeholder. Any solution that works with filepaths or with base 64 would satisfy my requirement of being able to run without Internet connectivity.
I'm running R 4.0.2 with Windows 10 Pro OS on a 64-bit OS and launching into Google Chrome.