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

Blurred background for non-covering photos #127

Open
krislawton opened this issue Mar 11, 2021 · 2 comments
Open

Blurred background for non-covering photos #127

krislawton opened this issue Mar 11, 2021 · 2 comments

Comments

@krislawton
Copy link

As an alternative to just having a black background, it might be good to have a second copy of the image in the background that covers the entire page and is blurred. Seems to be a common design pattern in modern times for showing images that don't have the same aspect ratio as their container.

Here is an example I drew up:

Without blur:
Without blur

With blur:
With blur

Here's a better example of a portrait image on a landscape display:
With blur #2

To do this, I added a copy of the "cloud" HTML element and set its background-size to cover, and its filter to blur(50px). Not sure how performance-intensive this is for mobiles nor how widespread the filter style is implemented on browsers, but it has been on my Windows Chrome browser for at least a year. The new cloud element needs to be before the existing one in the DOM or else it overlaps.

I could probably look at implementing this myself if there is a consensus, would take some familiarisation and setting up a dev enviro though.

@ubershmekel
Copy link
Owner

This is what I did with tagsyo.com

I wouldn't be against it if the implementation was simple. With tagsyo, I used the thumbnail as the background, so the blurry image loads faster.

@MrSpiffyClean
Copy link
Contributor

As long as there is an option to revert back to the black (or solid color, if changes are going to be made there) border, I wouldn't be bothered. I personally find it a bit distracting, but I mainly use this on desktop, so your mileage may vary.

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

3 participants