-
Notifications
You must be signed in to change notification settings - Fork 384
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
Img height or width = auto results in AMP validation error #781
Comments
Question About Whether Issue Still Exists Hi @mmills0, The snippet from this line in your comment above no longer has these expressions:
|
Hi @kienstra, I'm not the creator of this issue but I can add that it is still present in the latest version of AMP (0.6.2 at the time of writing this) for me. My specific use case is the inclusion of a third party image tag, i.e. Statista, which makes use of the "auto" value for height and a width of 100%. One example taken from here;
The "height" attribute is being set to blank, due to the call to
I'm tempted to say that the "height" and "width" retrieved through |
@cameronterry Is this still an issue in 0.7.x? |
Force run of determine_dimensions() on images set with height/width=auto and eliminate the AMP error due to missing height/width.
https://github.com/Automattic/amp-wp/blob/master/includes/sanitizers/class-amp-img-sanitizer.php#L40
Update to:
Or check
is_numeric()
instead of specifically for 'auto' ? Thoughts?The text was updated successfully, but these errors were encountered: