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

Doesn't work with local images inserted in ghost blog #2

Open
VimalMollyn opened this issue Nov 14, 2021 · 1 comment
Open

Doesn't work with local images inserted in ghost blog #2

VimalMollyn opened this issue Nov 14, 2021 · 1 comment

Comments

@VimalMollyn
Copy link

Hey! Thanks for creating a wonderful tool like this! I have one issue, that's the following: When I upload a custom banner image for a blog post, the image doesn't show up in the static site. Do you know if this can be fixed?

Thanks!
Vimal

@spanishhighs
Copy link

spanishhighs commented Aug 24, 2022

The problem was caused by the converting of responsive images (srcset) by Wget. This from my .static/index.html file

<img class="post-card-image"
--
  | srcset="content/images/size/w300/2022/08/RA302229.jpg 300w,
  | content/images/size/w600/2022/08/RA302229.jpgg 600w,
  | content/images/size/w1000/2022/08/RA302229.jpgpg 1000w,
  | content/images/size/w2000/2022/08/RA302229.jpgjpg 2000w"
  | sizes="(max-width: 1000px) 400px, 800px"
  | src="content/images/size/w600/2022/08/RA302229.jpg"
  | alt="Comment"
  | loading="lazy"
  | />

Inserted the following lines into the bottom of gui.sh, using replace and seemed to cure it

LC_ALL=C find ./static -type f -not -wholename *.git* -exec sed -i '' -e "s,jpgg,jpg,g" {} +
LC_ALL=C find ./static -type f -not -wholename *.git* -exec sed -i '' -e "s,jpgpg,jpg,g" {} +
LC_ALL=C find ./static -type f -not -wholename *.git* -exec sed -i '' -e "s,jpegjpg,jpg,g" {} +

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