-
Notifications
You must be signed in to change notification settings - Fork 385
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
<amp-img> gets converted into <img class="i-amphtml-fill-content i-amphtml-replaced-content"> #6032
Comments
The
With that, I suggest that you add the |
You also may not need to manually add |
Understood. Thanks @westonruter . I will implement it and let you know the outcome. Edit: Do I need to add data-hero attribute to the fallback image as well? |
Now I am getting this: <img class="i-amphtml-fill-content i-amphtml-replaced-content" decoding="async" alt="Hush 2016" src="https://www.flixwatch.co/wp-content/uploads/80091879-320x180.jpg.webp" data-hero=""> in PageSpeed Insights but the LCP hasn't changed as such. For the logo: <amp-img class="custom-logo i-amphtml-layout-fixed i-amphtml-layout-size-defined" alt="FlixWatch Logo" width="214" height="50" layout="fixed" src="https://www.flixwatch.co/wp-content/uploads/Flixwatch-214x50.jpg.webp" style="width:214px;height:50px" i-amphtml-layout="fixed" i-amphtml-ssr data-hero>
<amp-img alt="FlixWatch Logo" fallback width="214" height="50" layout="fixed" src="https://www.flixwatch.co/wp-content/uploads/Flixwatch-214x50.jpg"></amp-img>
<img class="i-amphtml-fill-content i-amphtml-replaced-content" decoding="async" alt="FlixWatch Logo" src="https://www.flixwatch.co/wp-content/uploads/Flixwatch-214x50.jpg.webp">
</amp-img> Also there are two warnings in the console: |
I don't immediately see how it can be further optimized. I do see that your logo seems to be a WebP which was derived from a heavily-compressed JPEG. The compression artifacts are clearly visible: I suggest creating a PNG for the custom logo instead. You may also want to look into using a vector graphic instead, and then inlining it as SVG. We've done this on https://amp-wp.org/
These seem to be related to ads on the page, namely AdSense. It's not something the AMP plugin is causing. You can ignore these errors per ampproject/amphtml#10431 (comment). |
I'm also noticing there is a layout shift caused by |
Ok. Will change the logo and change the amp-accordion to amp-bind. |
Bug Description
In the template, I am adding:
On the Source Code it shows:
But the PageSpeed Insights shows:
And the loading time is very high.
Expected Behaviour
Steps to reproduce
It's automatically getting converted into that format. I am not sure what are the steps to reproduce it other than installing the APM plugin.
Check: https://www.flixwatch.co/movies/hush/
Screenshots
Not Applicable, looks the same on the frontend.
Additional context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: