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

Create placeholder images with dominant color using $image.Colors method #176

Open
jwflory opened this issue Sep 28, 2022 · 0 comments
Open
Labels
C: documentation Improvements or additions to documentation I: help wanted Extra attention is needed T: new change Adds new capabilities or functionality

Comments

@jwflory
Copy link
Member

jwflory commented Sep 28, 2022

Summary

Use a Hugo filter to create a placeholder for an image using the dominant color of the image

Background

Is the new feature related to a problem? Describe the problem: Someone browsing the site from a poor connection will not see images immediately when viewing a page. The page may load in an unexpected way if the image is not yet downloaded.

What does the new feature look like to you?: If an image is not yet downloaded and rendered on-screen, show a placeholder with the dominant color of the image until it loads. This is a new feature in Hugo v.0.104.0.

Describe any alternatives considered: We could create a placeholder in another way. But using the dominant color of the image seems to be a clever way of doing that without disrupting the user experience.

Details

This issue needs additional research to better understand how to implement the placeholder image. Ideally the impact is in any page which features images. If the feature only works well on a page with several images, we may need to close this as out of scope.

Outcome

Better user experience for visitors with poor network connections

@jwflory jwflory added I: help wanted Extra attention is needed C: documentation Improvements or additions to documentation T: new change Adds new capabilities or functionality labels Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: documentation Improvements or additions to documentation I: help wanted Extra attention is needed T: new change Adds new capabilities or functionality
Projects
Status: Backlog
Development

No branches or pull requests

1 participant