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

Remove hard-coded isTiny() result for intrinsic layout #1184

Conversation

schlessera
Copy link
Collaborator

There is an error in the isTiny() where the width & height are ignored for an intrinsic layout. This is not correct, as for the intrinsic layout, the image is shrinking to fit the container, but can only grow up to the maximum of its width and height attributes. So if these are below the isTiny() threshold, it should be flagged accordingly.

Related PR in the PHP toolbox: ampproject/amp-toolbox-php#115

Copy link
Collaborator

@sebastianbenz sebastianbenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@sebastianbenz sebastianbenz merged commit bd2bb1a into ampproject:main Mar 29, 2021
@schlessera schlessera deleted the fix/is-tiny-detection-on-intrinsic-layout branch March 29, 2021 21:01
@schlessera
Copy link
Collaborator Author

Well, that was fast! Thanks, @sebastianbenz !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants