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

Calculate and set image intrinsic-size #967

Open
Munter opened this issue Jan 19, 2019 · 3 comments
Open

Calculate and set image intrinsic-size #967

Munter opened this issue Jan 19, 2019 · 3 comments

Comments

@Munter
Copy link
Member

Munter commented Jan 19, 2019

@papandreou
Copy link
Member

This is a really interesting spec!

Since the unit is CSS pixels, it seems like we can't just set intrinsicsize to the width and height of the image without knowing the intended dpr, too? Should we then infer that from whether there's 2x etc. in the file name of the image?

It looks like the presence of a srcset attribute will make this a bit complicated if the images in the set have different aspect ratios. But maybe we should just emit a warning in that case.

@Munter
Copy link
Member Author

Munter commented Jan 19, 2019

As I understand intrinsicsize it's all about the ratio of the image. So in that sense it probably doesn't matter much which srcset version we would choose as the basis. Unless the ratios are different of course

@papandreou
Copy link
Member

Hmm, right. I got confused about the scope of intrinsicsize because of "The sizes are in CSS Pixels" here: https://github.com/ojanvafai/intrinsicsize-attribute

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

2 participants