2.0 KiB
UI Kit v1.6.1 — AppHeader.Bi uses the original BI logo
Source of truth
src/assets/bi-logo.webp is the original 500×500 WebP (64,536 bytes).
The default BI logo is not a 192×192 thumbnail, not a recompressed image,
and not embedded as Base64 inside AppHeader.js.
The remote module source src/remote/ui/AppHeader/AppHeader.remote.jsx
references the original via new URL("../../../assets/bi-logo.webp", import.meta.url).
That original Vite source reference actually became Base64 in a library build.
Fixed in v1.6.2: build:remote now runs scripts/build-app-header-remote.mjs
after Vite and writes a separate original bi-logo.webp beside the output JS.
For prebuilt files in this ZIP, the original image is copied byte-for-byte to
dist/remote/bi-logo.webp and the prebuilt JS points to that same-directory file.
Deploy both these files together:
AppHeader.js
bi-logo.webp
For v1.6.2 and later, running build:remote produces these same two
files automatically. Deploy them together.
Behavior
<AppHeader.Bi optimize />takes the original image URL, measures the rendered BI logo size, and calls the exact sameprocessImagehelper used by<AppHeader.Logo optimize />(rs:auto,q:100,webp:true).<AppHeader.Bi />remains opt-out and loads the full original unchanged.- If the image service fails, it falls back to the full original.
- Custom
srcvalues are unaffected; they are optimized only ifoptimizeis explicitly true. - No
BiProvideror caller-side change is needed in existing systems.
The prebuilt JS stays small (~12 KB), but without optimize, the original
64,536-byte image is requested when BI is visible. With optimize, the
image service responds with a size-adjusted WebP derived from the full source.
Actual transfer size depends on the response and caching of the image service.
Validation
Run node --test tests/*.test.mjs. Test the actual remote deployment and
image service in a browser before rollout; the local test suite does not
perform an external CDN request.