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

Add placeholder, blurred versions of images #228

Open
NathanLovato opened this issue Oct 7, 2020 · 0 comments
Open

Add placeholder, blurred versions of images #228

NathanLovato opened this issue Oct 7, 2020 · 0 comments
Labels
enhancement good first issue html The task involves html and go templates.

Comments

@NathanLovato
Copy link
Collaborator

Images now use the browser-native lazy loading feature: they only download when reaching the image on the page. The issue is the placeholder elements have a height of 0 and pop into the page, pushing the text down.

We should encode some base64 image in the html as a placholder. Something blurry as on medium could be nice, ~8 to 16 pixels wide.

Here's a snippet to use hugo's image render processing feature to generate a preview image: https://github.com/gj52/HugoSample/blob/master/themes/photon/layouts/_default/_markup/render-image.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue html The task involves html and go templates.
Projects
None yet
Development

No branches or pull requests

1 participant