Support » Plugin: AMP » amp-img height problem solved

  • jadelaop


    With some plugins, images are the height attribute empty, and this is an amp error.

    This is the error message:

    The attribute ‘height’ in tag ‘amp-img’ is set to the invalid value ”.

    For solve this, I did the next modification in includes/sanitizers/class-amp-img-sanitizer.php before $new_attributes = $this->enforce_sizes_attribute( $new_attributes );

    if ( $new_attributes['height'] === '' ) {
        $new_attributes['height'] = self::FALLBACK_HEIGHT;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘amp-img height problem solved’ is closed to new replies.