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

The output path is incorrect 404 (Not Found) #10

Open
sonrisacc opened this issue Oct 27, 2019 · 1 comment
Open

The output path is incorrect 404 (Not Found) #10

sonrisacc opened this issue Oct 27, 2019 · 1 comment

Comments

@sonrisacc
Copy link

sonrisacc commented Oct 27, 2019

Maybe this has to do with me using Next https://theme-next.org/next-7-4-2-released/
The output folder structure is now like:

├── 2019
│   └── 10
│       └── 20
│           └── post
│               ├── blog.png
│               ├── huge-blog.png
│               ├── index.html
│               └── thumbnail-blog.png

but hexo-image-sizes's output path is _post/post/blog.png, which in result to a sad 404
I put some hack fix in by adding a date attribute + updated my local hexo-image-sizes in node_module to solve this issue. Not sure if I should make a pr for that since this is pretty hacky. Just bring it up so if anyone use next + hexo-image-sizes met the same problem can solve it this way. : ]

{% imsize %}
src: blog.png
alt: sample image
title: sample image
profile: thumbnail
link: true
linkProfile: huge
blogDate: 2019/10/26 .  <--- 
{% endimsize %}
@ottobonn
Copy link
Owner

Interesting, does next change the output structure? You might need to use a full path to your image source if it's in an unconventional place

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

2 participants