Replies: 1 comment 2 replies
-
@Kritner Could you please try the following changes? At https://github.com/ppoffice/hexo-theme-icarus/blob/4.4.0/layout/common/article.jsx#L36 - <img class="fill" src={cover} alt={page.title || cover} />
+ <img class="fill" src={url_for(cover)} alt={page.title || cover} /> At https://github.com/ppoffice/hexo-theme-icarus/blob/4.4.0/layout/common/article.jsx#L38 - <img class="fill" src={cover} alt={page.title || cover} />
+ <img class="fill" src={url_for(cover)} alt={page.title || cover} /> |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm making use of a
post_asset_folder
, where all my post's images and the like are stored in a folder in source asYYYYMMDD-my-post-title
. If I have a cover image, it is in the directory/source/_posts/20210101-my-post-title/cover.png
as an example. This post then gets generated under/public/2021/01/01/my-post-title/cover.png
and is hit through the URL/2021/01/01/my-post-title/cover.png
.When using a
thumbnail
in the front matter, thepost_asset_folder
is taken into account in such a way that the image source is the full URL to the image, including its subfolders, such ashttps://example.com/2021/01/01/my-post-title/cover.png
. However, when using thecover
in the front matter, onlyhttps://example.com/cover.png
is being returned as the "image url". This is causing broken image links on the "cover" but not the "thumbnail", is there a way to get the cover to correctly use thepost_asset_folder
URL construction as well?Beta Was this translation helpful? Give feedback.
All reactions