<JImage node={x} width={640} height={400} /> type-checks and throws needsSizes at render: width/height are markup attributes only and never reach the URL, so nothing requests a resize. JImage.tsx's own JSDoc example is written that way, and JImage.spec.tsx adds slotWidth: 48 alongside them to work around it.
Why it matters beyond ergonomics: a Jahia module that rewrites rendered HTML server-side (smart-images) honours exactly the ?w= / ?h= URLs the query channel emits. On such an instance width/height could express the resize directly — and that is the syntax module developers expect to use, in JSP and TSX alike.
This conflicts with #767 point 3, which proposes making width/height a required pair that errors loudly instead. Both cannot hold, so please arbitrate:
- derive a fixed slot (
slotWidth = width) when no slot is given — the doc example then works as written; or
- keep it an error, and state in the guide that requesting a resize always needs
slotWidth / sizes / widths.
<JImage node={x} width={640} height={400} />type-checks and throwsneedsSizesat render:width/heightare markup attributes only and never reach the URL, so nothing requests a resize.JImage.tsx's own JSDoc example is written that way, andJImage.spec.tsxaddsslotWidth: 48alongside them to work around it.Why it matters beyond ergonomics: a Jahia module that rewrites rendered HTML server-side (smart-images) honours exactly the
?w=/?h=URLs the query channel emits. On such an instancewidth/heightcould express the resize directly — and that is the syntax module developers expect to use, in JSP and TSX alike.This conflicts with #767 point 3, which proposes making
width/heighta required pair that errors loudly instead. Both cannot hold, so please arbitrate:slotWidth = width) when no slot is given — the doc example then works as written; orslotWidth/sizes/widths.