Please do not hijack the simple <img /> tag, and treat it as a component. :)
These are the compromises I would vote for:
You can upgrade the Image component to support src to be String or
Asset, etc etc..
You can create a new component called "Img" :) so people can do <t:img
src=""/>
:) :)
Howard M. Lewis Ship (JIRA) wrote:
Tapestry's template parser should identify <img src="..."/> and convert the src
attribute to use a context Asset
----------------------------------------------------------------------------------------------------------------
Key: TAP5-504
URL: https://issues.apache.org/jira/browse/TAP5-504
Project: Tapestry 5
Issue Type: New Feature
Components: tapestry-core
Affects Versions: 5.1.0.0
Reporter: Howard M. Lewis Ship
Currently, if you have:
<img src='/images/icon.png"/>
you do not get the benefit of version numbering, far future expires headers,
gzip compression, etc. To get that benefit you must:
<img src="${context:images/icon.png}"/>
It seems to me that Tapestry could recognize this pattern, and perhaps <input
type="image"/> as well, and automatically supply the context binding, if the
attribute content is simple text.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]