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

New Feature: Low Quality Image Placeholder cont. #2661

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

aSouchereau
Copy link
Contributor

Continues #2558 for #2258 including new frontend implementation.

Adds low quality image placeholder to be displayed while album covers are downloading.
Improves perceived loading times.

Approach:

  • Adds new size variant of type 7 called 'placeholder'
  • Adds PlaceholderEncoder class to compress image to usable size, convert to base64 and save to db
  • Adds new standalone pipe to process the placeholder
  • Adds step in legacy code path to process the placeholder
  • Adds command to handle placeholders that exist but have not been encoded yet
  • Adds diagnostic info check for determining number of missing and unencoded placeholders
  • Adds maintenance option to generate missing placeholders
  • Modifies SizeVariant getUrlAttribute to use data URI instead of app url for placeholders
  • Modifies Thumb to include generated placeholder

Demo

lqip-demo

Copy link

codecov bot commented Nov 9, 2024

Codecov Report

Attention: Patch coverage is 89.62963% with 14 lines in your changes missing coverage. Please review.

Project coverage is 84.82%. Comparing base (2001c44) to head (757cefe).
Report is 1 commits behind head on master.

Additional details and impacted files

@ildyria
Copy link
Member

ildyria commented Nov 9, 2024

@aSouchereau can you squash the full branch ? So that you get all the credits when we merge. :)

@aSouchereau aSouchereau force-pushed the album-cover-placeholder branch from 1f84406 to f7fc2c5 Compare November 9, 2024 20:40
@aSouchereau
Copy link
Contributor Author

Oops, not sure if thats correct. All commits related to the placeholder feature are squashed. Everything else is the result of a previous merge commit.

@ildyria
Copy link
Member

ildyria commented Nov 9, 2024

I fixed the conflicts.
Can you check if the check if the changes are as you wish. :)

@ildyria
Copy link
Member

ildyria commented Nov 9, 2024

If so you can squash everything with :

# Do make sure that your master branch is up to date with current lychee master
git pull master
# soft reset the branch to master (keep the changes but place the pointer on master HEAD)
git reset --soft master
git commit -m " .... "
git push --force <origin> album-cover-placeholder

@aSouchereau aSouchereau force-pushed the album-cover-placeholder branch from 60af2d3 to 757cefe Compare November 9, 2024 21:04
@aSouchereau
Copy link
Contributor Author

If so you can squash everything with :

# Do make sure that your master branch is up to date with current lychee master
git pull master
# soft reset the branch to master (keep the changes but place the pointer on master HEAD)
git reset --soft master
git commit -m " .... "
git push --force <origin> album-cover-placeholder

Yes, looks good. Thanks for the help :)

@ildyria
Copy link
Member

ildyria commented Nov 9, 2024

I replaced the hidden by animation-fadeOut animation-fill-forward so that the transition is nicer. :)

@ildyria ildyria merged commit 2659bee into master Nov 9, 2024
49 checks passed
@ildyria ildyria deleted the album-cover-placeholder branch November 9, 2024 21:32
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

Successfully merging this pull request may close these issues.

2 participants