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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Get natural dimensions of image in checkImageReSize_ #29970

Merged
merged 2 commits into from Aug 26, 2020

Conversation

processprocess
Copy link
Contributor

@processprocess processprocess commented Aug 25, 2020

This is a follow up to #29882

Use naturalWidth and naturalHeight from imgEl instead of width and height.
Otherwise if the user specifies smaller image dimensions the code will fail.

Such as in this example:
Screen Shot 2020-08-25 at 3 33 57 PM
imgEl.width would equal 10 and the code will fail.
We need to use imgEl.naturalWidth to get the source image dimension which is 7168

@processprocess processprocess added this to In progress in wg-stories Story-360 via automation Aug 25, 2020
@processprocess processprocess self-assigned this Aug 25, 2020
@processprocess processprocess added this to In progress in wg-stories Sprint via automation Aug 25, 2020
@google-cla google-cla bot added the cla: yes label Aug 25, 2020
@amp-owners-bot
Copy link

Hey @gmajoulet, @t0mg! These files were changed:

extensions/amp-story-360/0.1/amp-story-360.js

@processprocess processprocess merged commit a3978d9 into ampproject:master Aug 26, 2020
wg-stories Story-360 automation moved this from In progress to Done Aug 26, 2020
wg-stories Sprint automation moved this from In progress to Done Aug 26, 2020
@processprocess processprocess deleted the get-natural-size branch August 26, 2020 21:05
@gmajoulet gmajoulet removed this from Done in wg-stories Sprint Aug 31, 2020
ed-bird pushed a commit to ed-bird/amphtml that referenced this pull request Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants