[ 
https://issues.apache.org/jira/browse/TAP5-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672358#action_12672358
 ] 

Robert Zeigler commented on TAP5-504:
-------------------------------------


I'm with Fernando on this one; don't hijack the img tag.

A central tenet of tapestry template processing is that anything that is /not/ 
a component or expansion is passed-through unmodified.  Having <img 
src="foo.png"/> act like <img src="${context:foo.png}"/> violates that tenet; 
the fewer exceptions we have, the better. Again, this is Fernando's suggestion, 
but making a dedicated image component is a less confusing solution to this 
problem; you get the benefit of auto-translation of the "src" parameter, and 
the benefit of template coimprehension, since <t:img .../> is clearly a 
component.

> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to