RinteRface / fullPage

📄 fullPage.js, pagePiling.js and multiScroll.js for shiny
https://fullpage.rinterface.com
Other
111 stars 12 forks source link

fullSectionImage working only with online sources #12

Closed Alik-V closed 3 years ago

Alik-V commented 3 years ago

Hi John, Thank you for this wonderful package, it's a shame I haven't come across it sooner.

I got a question regarding adding images to fullSectionImage() and similar functions. Is it only possible to include online sources for the images? I am trying to source local images in the function with no success using the following code:

  fullSectionImage(
    # img = "www/intro_stethoscope.jpg", # this doesn't work
    img = "https://diatribe.org/sites/default/files/images/7578d2ba-620a-4045-a6b2-3176c8c32241.jpg", # this does
    h1("Some text")
  )
JohnCoene commented 3 years ago

This should work, are you sure images in the www directory are served?

I would add shiny::addResourcePath("www", "www")

Alik-V commented 3 years ago

Adding resource path worked like a charm, thank you!