Problem/Motivation
#3550456: Switch media loading from `lazy` to `eager` to improve LCP
Currently, the Varbase OEmbed Formatter hardcodes the iframe loading attribute to "lazy".
This prevents site builders or administrators from configuring how embedded media should load (e.g., eager for LCP-critical content).
Proposed resolution
Replace the hardcoded loading="lazy" with a value pulled from formatter settings:
'loading' => $this->getSetting('loading')['attribute'],
Expose a formatter setting to allow choosing the iframe loading behavior.
Default can remain "lazy" but allow overrides such as "eager".
Ensure backward compatibility with existing configurations.
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ✅ Code review from 1 Varbase core team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Update Release Notes and Update Helper on new feature change/addition
- ✅ Release varbase-10.1.0-beta1, varbase_media-10.1.0-beta1
Varbase update type
- ✅ No Update
- ➖ Optional Update
- ➖ Forced Update
- ➖ Forced Update if Unchanged
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- [#3550491] feat(oembed-formatter): Make iframe loading attribute configurable instead of hardcoded to
`lazy`
Comments
Comment #2
rajab natshahComment #4
rajab natshahComment #5
rajab natshahComment #7
rajab natshahComment #8
rajab natshah✅ Released varbase_media-10.1.0-beta1
Comment #10
rajab natshah✅ Released varbase-10.1.0-beta1