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

Preview images on home page fail to render in 6.5.4 #1625

Closed
1 task done
steveng57 opened this issue Mar 23, 2024 · 7 comments · Fixed by #1627
Closed
1 task done

Preview images on home page fail to render in 6.5.4 #1625

steveng57 opened this issue Mar 23, 2024 · 7 comments · Fixed by #1627
Labels
bug Something isn't working

Comments

@steveng57
Copy link

steveng57 commented Mar 23, 2024

Checklist

How did you create the site?

Generated from chirpy-starter

Describe the bug

Changes to img-url.html have broken the url generation for preview images, resulting in bad links for posts that use preview images. All preview images on the home page fail to render. Favicon seems to have suffered the same fate.

In 6.5.3, the img src attribute was properly generated.
<img loading="lazy" alt="About 2 weeks to assemble" src="/assets/img/posts/assembly-table/thumbnails/20201001_193728.jpeg">

In 6.5.4, In the image link, there are now two slashes prefixing the src attribute.
<img loading="lazy" alt="About 2 weeks to assemble" src="//assets/img/posts/assembly-table/thumbnails/20201001_193728.jpeg">

There were changes to the img-url.html that look like they may have caused this.
v6.5.3...v6.5.4

Please note that all my posts use the preview image with the following format for the image declaration in the YAML front matter.

image:
  path: /thumbnails/20170127_010801.jpeg
  alt: MDF and 2x4's - pretty simple
img_path: /assets/img/posts/first-workbench

Note that I am not using a CDN for any images.

Steps To Reproduce

  1. 6.5.4 environment
  2. Format your preview image YAML as described above in a post Front Matter
  3. Run.
    Preview images do not show up on the home page. They do show up however on the post itself.

Expected Behavior

preview images should be visible in the home page.

Environment

  • Ruby: 3.2.1
  • Jekyll: 4.3.3
  • Chirpy: 6,5,4

Anything else?

No response

@steveng57 steveng57 changed the title img url is broken in 6.5.4 Preview images on home page fail to render. img-url.html is broken in 6.5.4 Mar 23, 2024
@steveng57 steveng57 changed the title Preview images on home page fail to render. img-url.html is broken in 6.5.4 Preview images on home page fail to render in 6.5.4 Mar 23, 2024
@Santoshkurmi
Copy link

Santoshkurmi commented Mar 23, 2024

I am facing the same problem. Yesterday everything was working properly. Today I write a simple post, and once the github build the page , all the images tag stopped working on both preview images as well as any other image tag.

The problem is if there is image path like : image: /assets/cat.jpg , it renders the img tag with
<img src="//assets/cat.jpg"/> , so it adds extras slash in place of image path for relative file path. For url images,it is working fine. If there is two slash infront of image path, the browser is treating the path as http://assets/cat.jpg which is invalid url.

For now, I have restricted in Gemfile to v6.5.3 only, now again everything is working fine.

@DmitriyFrogo
Copy link
Contributor

For me, after update to 6.5.4, html-proofer give me errors like "Image link //commons/avatar.jpg is a protocol-relative URL, use explicit https:// instead" and refused to build whole site
I fixed this issue by adding "https://USERNAME.github.io" domain to img_cdn, as described here #1623

@Santoshkurmi

This comment was marked as duplicate.

@cotes2020
Copy link
Owner

It'll be fixed soon.

@cotes2020 cotes2020 added the bug Something isn't working label Mar 23, 2024
@cotes2020 cotes2020 linked a pull request Mar 23, 2024 that will close this issue
1 task
@bethanybeachbum
Copy link

I am having a very similar problem.

Steps To Reproduce
During tests, images cannot be found.

Expected Behavior
images should past testing.

Environment:
Ruby: 3.2.3
Jekyll: 4.3.3
Chirpy: 6.5.5

test error:
Screenshot 2024-03-24 at 12 30 57 PM

To solve problem I am referencing all pictures on my laptop this way:
![ohiopyle] (https://github.com/bethanybeachbum/bethanybeachbum.github.io/blob/main/assets/img/Ohiopyle.jpeg)
Then once tests pass, I go into my files on gitthub and rewrite accordingly:
ohiopyle

Thanks for a great theme! I am committed to making it work.

@kungfux
Copy link
Collaborator

kungfux commented Mar 24, 2024

@bethanybeachbum I see no discrepancy in tests. Those images mentioned in test pipeline do not exist in your /assets/img folder as I can see. Please double check image names your are trying to use.

  • /assets/img/trail.jpg does not exist, instead you have assets/img/trail2.jpg
  • image /assets/img/Ohiopyle.jpg does not exist, instead you have /assets/img/Ohiopyle.jpeg

@bethanybeachbum
Copy link

bethanybeachbum commented Mar 24, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants