Skip to content

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

Merged
sebastianbenz merged 2 commits intoampproject:mainfrom
schlessera:fix/is-tiny-detection-on-intrinsic-layout
Mar 29, 2021
Merged

Remove hard-coded isTiny() result for intrinsic layout#1184
sebastianbenz merged 2 commits intoampproject:mainfrom
schlessera:fix/is-tiny-detection-on-intrinsic-layout

Conversation

@schlessera
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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