Image scoping issue when using Wowchemy Hugo Academic and Blogdown workflow

I was following ApresHill's amazingly helpful blog post for creating my website. I have a question regarding the image scoping, I would appreciate it if someone can shed some light. Wowchemy tutorial says the images can be placed under /assets/media/ folder starting with Wowchemy v5.1. Prior to this release, they were to be found under static folder.

My question has to do with the difference in scoping when I'm referring to an image in the yaml front matter or within the post itself. In short, YAML headers scope for images in /assets/media/ while post bodies scope for images in static/media/:

Let the image paths be:
/assets/media/IMG_IN_ASSETS_MEDIA_FOLDER.jpg
/static/media/IMG_IN_STATIC_MEDIA_FOLDER.jpg

---
# This works in YAML
  background:
    image: IMG_IN_ASSETS_MEDIA_FOLDER.jpg
    image_darken: 0.65
    image_parallax: true
    image_position: center
    image_size: cover
    text_color_light: true
  spacing:
    padding: ["20px", "0", "20px", "0"]
---
---
# This doesn't work in YAML
  background:
    image: IMG_IN_STATIC_MEDIA_FOLDER.jpg
    image_darken: 0.65
    image_parallax: true
    image_position: center
    image_size: cover
    text_color_light: true
  spacing:
    padding: ["20px", "0", "20px", "0"]
---

When I try to insert an image to the post body only static folder is scoped

# adding images under `static` folder works
![](/media/IMG_IN_STATIC_MEDIA_FOLDER.jpg) # works 

# images under `/assets/media/` aren't found. I tried a few things here:
![](/media/IMG_IN_ASSETS_MEDIA_FOLDER.jpg)
![](/assets/media/IMG_IN_ASSETS_MEDIA_FOLDER.jpg)
![](../assets/media/IMG_IN_ASSETS_MEDIA_FOLDER.jpg)

I don't know about Wowchemy evolution but this could be related to how blogdown expects assets and handle them. Files in static/ will be moved to the publishing folder, so that is why it works. Possibly other link point to file that do not existe in the publishing folder (or at another path).

If you can build a repo with a reproducible example, you could open an issue in bookdown repo so that we may try to support this ?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.