Skip to content

feat: add picture-lqip format with low quality base64 image - #662

Open
pzerelles wants to merge 1 commit into
JonasKruckenberg:mainfrom
pzerelles:lqip
Open

feat: add picture-lqip format with low quality base64 image#662
pzerelles wants to merge 1 commit into
JonasKruckenberg:mainfrom
pzerelles:lqip

Conversation

@pzerelles

Copy link
Copy Markdown
Contributor
  • Quick Checklist
  • I have read the contributing guidelines
  • I have written new tests, as applicable (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • I have added a changeset, if applicable
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Feature

  • What is the new behavior (if this is a feature change)?
    The picture output can have a low quality base64 image.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this
    PR?)
    No

  • Other information:

@changeset-bot

changeset-bot Bot commented Nov 29, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dfc32a9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
imagetools-core Patch
vite-imagetools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Nov 29, 2023

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.17%. Comparing base (dc2f16f) to head (dfc32a9).
⚠️ Report is 146 commits behind head on main.

Files with missing lines Patch % Lines
packages/core/src/output-formats.ts 94.11% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #662   +/-   ##
=======================================
  Coverage   94.17%   94.17%           
=======================================
  Files          33       33           
  Lines        1235     1270   +35     
  Branches      206      212    +6     
=======================================
+ Hits         1163     1196   +33     
- Misses         72       74    +2     
Flag Coverage Δ
imagetools-core 94.17% <94.44%> (+<0.01%) ⬆️
vite-imagetools 94.17% <94.44%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@benmccann

Copy link
Copy Markdown
Collaborator

If I understood the code here correctly, it looks like this isn't really transforming the image in a way that makes it much smaller (e.g. to display just the dominant background color). I think if we were going to add a feature like this we should do it with different transforms that shrink the image in various ways as mentioned in #86 (comment). We don't have to add them all off the bat, but it might be nice to have two options people could choose between to help us figure out the API

@benmccann benmccann mentioned this pull request Mar 28, 2024
4 tasks
@pzerelles

Copy link
Copy Markdown
Contributor Author

It actually takes the smallest size that you specify in the transform for the low quality preview.

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