Skip to content

Fix/replace amp img#7402

Open
lavjeetrai wants to merge 2 commits into
sugarlabs:masterfrom
lavjeetrai:fix/replace-amp-img
Open

Fix/replace amp img#7402
lavjeetrai wants to merge 2 commits into
sugarlabs:masterfrom
lavjeetrai:fix/replace-amp-img

Conversation

@lavjeetrai
Copy link
Copy Markdown

What is the current behavior?

The index.html file 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 an HTMLUnknownElement, 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:

  • Swapped <amp-img> to <img> for valid DOM parsing.
  • Added the native 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.
  • Maintained all existing attributes (id, src, alt, style, width). Zero application logic or CSS was altered.

Checklist

  • Performance
  • Kept PR scope strictly limited to this single HTML fix.

@github-actions github-actions Bot added performance Improves performance (load time, memory, rendering) size/M Medium: 50-249 lines changed area/javascript Changes to JS source files area/core Changes to core app entry files labels May 20, 2026
@github-actions
Copy link
Copy Markdown
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%
Master Coverage: Statements: 48.11% | Branches: 39.52% | Functions: 52.84% | Lines: 48.52%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Changes to core app entry files area/javascript Changes to JS source files performance Improves performance (load time, memory, rendering) size/M Medium: 50-249 lines changed

Projects

Development

Successfully merging this pull request may close these issues.

1 participant