Fix/replace amp img#7402
Open
lavjeetrai wants to merge 2 commits into
Open
Conversation
Contributor
|
🧪 Jest Test Results ✅ All Jest tests passed! This PR is ready to merge. Coverage: Statements: 46.9% | Branches: 38.37% | Functions: 51.3% | Lines: 47.33% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the current behavior?
The
index.htmlfile uses<amp-img>tags for the site logo and the loading spinner. However, the required Accelerated Mobile Pages (AMP) JavaScript runtime is not loaded anywhere in the document<head>. Because of this missing dependency, the browser parses these tags as anHTMLUnknownElement, resulting in invalid HTML that relies purely on fallback browser error-handling to render the images.What is the new behavior?
This PR replaces the two instances of
<amp-img>with standard, native HTML5<img>tags.Technical Details:
<amp-img>to<img>for valid DOM parsing.loading="lazy"attribute to both images. This preserves the performance and lazy-loading benefits that the original AMP implementation was attempting to provide, but without requiring external libraries.id,src,alt,style,width). Zero application logic or CSS was altered.Checklist