HomeSealhub

Add resolution guessing using sizes in image-router (updated)

Description

Add resolution guessing using sizes in image-router (updated)

Summary:
Ref T2273

Test Plan: In test>app.ts change input_img_path to path
the example>image.png is located on your system.
Then run 'npm run test' and go to localhost:3005 in your browser.

Now you can inspect every picture using devtools. You can see all the resolutions
in srcset attributes of every <source> element.
(tip: double click on srcset in devtools to see them in a nicely formatted way)

If you want to test cases with different sizes_attr, change them in test>app.ts
Don't pass resolutions, they will be calculated automatically.

Expected result: In srcset there should be resolutions that are:

  • each size in px passed in sizes_attr
  • each size in vw calculated using media condition (like max-width) and some resolution in range of that condition
  • each of the above doubled

Reviewers: kuba-orlik

Reviewed By: kuba-orlik

Subscribers: kuba-orlik

Maniphest Tasks: T2273

Differential Revision: https://hub.sealcode.org/D1221

Details

Provenance
PaulSAuthored on Feb 8 2022, 16:17
PaulSPushed on Feb 8 2022, 15:19
Reviewer
kuba-orlik
Differential Revision
Restricted Differential Revision
Parents
rRIMAGEROUTERe3da19e17ff3: Update types
Branches
Unknown
Tags
Unknown
Tasks
Unknown Object (Maniphest Task)

Event Timeline

PaulS added a revision: Restricted Differential Revision.Feb 8 2022, 15:19
PaulS added a task: Unknown Object (Maniphest Task).