Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

images not load #49

Open
pessimo opened this issue Jul 23, 2019 · 0 comments
Open

images not load #49

pessimo opened this issue Jul 23, 2019 · 0 comments

Comments

@pessimo
Copy link

pessimo commented Jul 23, 2019

i configured hugo in config.toml where i changed default image dir to
staticDir = ["content/static/images/"], then i put example images in content/static/images/post1

after i write my md file just as the example shows.

{{< gallery caption-effect="fade" >}}
{{< figure link="post1/hexagon.jpg" >}}
{{< figure thumb="-thumb" link="post1/sphere.jpg" caption="Sphere" >}}
{{< figure thumb="-thumb" link="post1/triangle.jpg" caption="Triangle" alt="This is a long comment about a triangle" >}}
{{< /gallery >}}
{{< load-photoswipe >}}

those images in the album of the main pages loaded successfully, but the images inside that post(means when you click the post name and readmore) were not loaded properly. They are not found.

it seems those photo on the main pages were using url like blog/post1/hexagon.jpg while those
images inside the post were using url like blog/post/[this is post name]/post1/hexagon.jpg. And i try to build pages in terminal use " hugo ", those images were not in public/post/[this is post name]/

i have no idea how to solve it.

I try to tweak around config.toml file, and find this problem might be relative to urls,when I use baseurl = "https://localhost:1313/" or baseurl = "https://localhost:1313/blog/" the result is different, also there's something to do with CanonifyURLs and RelativeURLs... hope someone could solve my question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant