Image link in front matter breaks when referencing image created in notebook

I am guessing this behavior is expected and not something to be fixed but I just wanted to raise awareness.

In my notebook I am generating a figure and saving it to “images/folder/image.svg” which lives under the “_notebooks” folder. When publishing it gets copied to top level “images/copied_from_nb/images/folder/image.svg” as expected and my references in the notebook markdown cell <img=“image/folder/image.svg” /> is correctly converted to
{% include image.html file="/blog/images/copied_from_nb/images/folder/image.svg" %}

Now I want to use the file as the front matter image for the post card, so I actually need to reference it as “images/copied_from_nb/images/folder/image.svg” instead of referencing it as other images in the notebook as “images/folder/image.svg”

I can’t see a solution for this being parsed as it is not known when parsing the notebook that the image gets created in the notebook, but mentioning it in the docs that front matter needs to reference the top level image hierarchy might be a good idea.

This is already specified in bold in the docs https://github.com/fastai/fastpages#setting-an-image-for-social-media

1 Like

Wow. I am sorry :smiley: I looked for it but somehow I missed it. Thanks for clearing that up. Can you either delete this post or mark it solved or something like that? I can’t seem to be able to rename it.

No worries! I don’t have the ability to change your title

BTW don’t sweat it :slight_smile: