Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

perf(images): lazy-load and async-decode the five <img> tags that declared no loading attribute

nirholas3c8ff8d17a36
diff --git a/src/agent-invoice-page.js b/src/agent-invoice-page.js
index ed9e73ce3..615e36a3b 100644
--- a/src/agent-invoice-page.js
+++ b/src/agent-invoice-page.js
@@ -190,7 +190,7 @@ function payMarkup(inv) {
${expired ? `<div class="ac-notice ac-notice-warn" style="margin-top:var(--space-sm)"><strong>This invoice is past due.</strong> A payment still settles it and is marked as paid late. Check with the issuer before paying if you are unsure it is still wanted.</div>` : ''}
${inv.network !== 'mainnet' ? `<div class="ac-notice ac-notice-info" style="margin-top:var(--space-sm)">This is a <strong>${esc(inv.network)}</strong> test invoice. Switch your wallet to ${esc(inv.network)} before paying; mainnet funds sent here are not counted.</div>` : ''}
<div class="ac-pay" style="margin-top:var(--space-md)">
- <div class="ac-qr"><img src="${esc(qrSrc)}" width="200" height="200" alt="Solana Pay QR code for ${esc(fmtAmount(amountDue))} ${esc(inv.symbol)} to ${esc(shortAddr(inv.recipient))}" /></div>
+ <div class="ac-qr"><img loading="lazy" decoding="async" src="${esc(qrSrc)}" width="200" height="200" alt="Solana Pay QR code for ${esc(fmtAmount(amountDue))} ${esc(inv.symbol)} to ${esc(shortAddr(inv.recipient))}" /></div>
<div class="ac-pay-body">
<p class="ac-hint" style="margin:0">Scan with a Solana wallet app, or open the link in a wallet on this device. The amount, recipient, reference and memo are filled in for you.</p>
<div class="ac-pay-actions">
diff --git a/src/desktop/assistant/index.js b/src/desktop/assistant/index.js
index 54f04774f..6c3a64222 100644
--- a/src/desktop/assistant/index.js
+++ b/src/desktop/assistant/index.js
@@ -133,7 +133,7 @@ function open(ctx) {
// ---------- who you're talking to ----------
const avatar = (a) =>
- a?.avatar_thumbnail ? `<img src="${esc(a.avatar_thumbnail)}" alt="" referrerpolicy="no-referrer">` : a ? `<i>${esc(a.name.slice(0, 1).toUpperCase())}</i>` : `<i class="asx-logo">${icon('sparkle', 15)}</i>`;
+ a?.avatar_thumbnail ? `<img loading="lazy" decoding="async" src="${esc(a.avatar_thumbnail)}" alt="" referrerpolicy="no-referrer">` : a ? `<i>${esc(a.name.slice(0, 1).toUpperCase())}</i>` : `<i class="asx-logo">${icon('sparkle', 15)}</i>`;
const paintWho = () => {
who.innerHTML = `${avatar(state.agent)}<span><b>${esc(state.agent?.name || 'Assistant')}</b><small>${state.agent ? 'three.ws agent' : 'three.ws'}</small></span>${icon('chevron', 12)}`;
input.placeholder = state.agent ? `Message ${state.agent.name}` : 'Ask anything about three.ws';
diff --git a/src/desktop/os/apps/camera.js b/src/desktop/os/apps/camera.js
index e75974c2f..842c4fd16 100644
--- a/src/desktop/os/apps/camera.js
+++ b/src/desktop/os/apps/camera.js
@@ -322,7 +322,7 @@ export function mount(host, ctx) {
const u = await fs.urlFor(n.path);
if (u) {
urls.add(u);
- b.innerHTML = `<img alt="" src="${u}">`;
+ b.innerHTML = `<img loading="lazy" decoding="async" alt="" src="${u}">`;
}
} else b.innerHTML = ICO.film;
b.addEventListener('click', () => ctx.openPath(n.path));
diff --git a/src/desktop/os/apps/photos.js b/src/desktop/os/apps/photos.js
index 2f229623d..c4ce18beb 100644
--- a/src/desktop/os/apps/photos.js
+++ b/src/desktop/os/apps/photos.js
@@ -231,7 +231,7 @@ export function mount(host, ctx) {
<button class="ph-b" data-act="download" title="Download" aria-label="Download">${icon('download', 17)}</button>
<button class="ph-b danger" data-act="delete" title="Delete (Del)" aria-label="Delete">${icon('trash', 17)}</button>
</div>
- <div class="ph-stage loading" tabindex="0" aria-label="Picture"><img class="ph-img" alt="${esc(node.name)}" draggable="false" /><div class="ph-spin" aria-label="Loading picture"></div>
+ <div class="ph-stage loading" tabindex="0" aria-label="Picture"><img loading="lazy" decoding="async" class="ph-img" alt="${esc(node.name)}" draggable="false" /><div class="ph-spin" aria-label="Loading picture"></div>
<button class="ph-nav prev" data-act="prev" aria-label="Previous picture">${icon('ph-left', 24)}</button>
<button class="ph-nav next" data-act="next" aria-label="Next picture">${icon('ph-right', 24)}</button>
</div>
diff --git a/src/scene-studio/agent-tab.js b/src/scene-studio/agent-tab.js
index 05a082e4d..91c26952c 100644
--- a/src/scene-studio/agent-tab.js
+++ b/src/scene-studio/agent-tab.js
@@ -468,7 +468,7 @@ export function createAgentPanel(editor) {
li.className = 'tws-agent-version';
const time = new Date(version.at).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
li.innerHTML = `
- ${version.screenshot ? `<img src="${version.screenshot}" alt="" width="48" height="36" />` : '<span class="tws-agent-version-noimg" aria-hidden="true"></span>'}
+ ${version.screenshot ? `<img loading="lazy" decoding="async" src="${version.screenshot}" alt="" width="48" height="36" />` : '<span class="tws-agent-version-noimg" aria-hidden="true"></span>'}
<span class="tws-agent-version-label">${escapeHtml(version.label).slice(0, 60)}</span>
<span class="tws-agent-version-time">${time}</span>
<button type="button" data-restore="${version.id}">Restore</button>