If you want a little more flexibility, then you might use one macro (or, I’d prefer, one procedure) that takes the url as a parameter:
\procedure img-pct(pct:100)
<img src=`https://people.sunypoly.edu/~steve/images/$(image-name)$` width=`$(pct)$%` height=`$(pct)$%` />
\end
then use this as
<<img-pct 10>>
<!-- or -->
<<img-pct 100>>
I would prefer to extend this to take the image name as a parameter,
\procedure img-pct(image-name, pct:100)
<img src=`https://people.sunypoly.edu/~steve/images/$(image-name)$` width=`$(pct)$%` height=`$(pct)$%` />
\end
But the image name is not a static string, which would mean you could no longer use the short-form <<macro-call syntax>>
, and would have to write this instead:
<$transclude $variable="img-pct" image-name=<<image-name>> pct="10" />
On the plus side, you could then remove the vars
wrapper and just write
<$transclude $variable="img-pct" image-name={{!!image-name}} pct="10" />
serving-images-on-the-web2.json (1.1 KB)