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