Yeah, I think we can easily make a tag that will intuit the path from the src, and of course it can pick up the height and width from the settings. Many times the wysiwyg editor will set those for you automatically, so if we just pick those up then that would be a big help. 
<br><br>We could take it a step further and determine the image size ourself, cache it, and if not specified auto use the image size. <br><br>Will start simple and then play around to see what we can do.<br><br><div><span class="gmail_quote">
On 6/9/06, <b class="gmail_sendername">Deb Lewis</b> &lt;<a href="mailto:djlewis@acm.org">djlewis@acm.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
RE: mv:image_tag attribute notation and Ed's remarks:<br><br>&gt;&gt; Currently, to support image sizes and other attributes, I am forced<br>&gt;&gt; to do this for all my image tags:<br>&gt;&gt; &lt;img src=&quot;../../../public/images/my.gif&quot; height=&quot;17&quot; width=&quot;16
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mv:image_tag=&quot;'my.gif', :size =&gt; '17x16'&quot;&gt;<br><br>Ed - we'll probably have to think about that a bit before responding<br>further.<br><br>In the meantime, you might consider some alternative techniques approaches
<br>using css style rules with your &lt;img&gt; elements.<br><br>Option 1: if you have a small set of specific images that you use in a<br>number of places, consider defining a class in your css stylesheet for these<br>so you don't have to hard-code the size attributes in the &lt;img&gt; markup.
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src=&quot;../../../public/images/my.gif&quot; height=&quot;17&quot; width=&quot;16<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv:image_tag=&quot;'my.gif', :size =&gt; '17x16'&quot; /&gt;<br><br>could be replaced with style rule and simplified markup:
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;img.my-gif {&nbsp;&nbsp;width: 16px;&nbsp;&nbsp;height: 17px; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src=&quot;../../../public/images/my.gif&quot; class=&quot;my-gif&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv:image_tag=&quot;'my.gif', :class =&gt; 'my-gif'&quot; /&gt;<br><br>
(don't like the need to duplicate the style rule class, but IMO that's still<br>a better than bolting down image file size attributes directly in content<br>pages)<br><br>Option 2: if you have a number of standard-sized images that you use
<br>frequently, do a variation of the preceding with a style rule, say, some<br>name by 'visual-cue-img', whatever makes sense.<br><br>And a possible option 3: create a custom masterview directive to encapsulate<br>a standard pattern than you want to use across a number of pages in our
<br>site.<br><br>(I actually have a situation that #3 solves nicely in I'm doing right now,<br>so after working out details will probably contribute it to the next<br>MasterView release as an example of how to do a custom masterview directive)
<br><br>&gt;&gt;&gt; So even &lt;img src=&quot;../../../public/images/my.gif&quot; needs:<br>&gt;&gt;&nbsp;&nbsp;mv:image_tag=&quot;'my.gif'&quot;<br><br>Jeff - this might be interesting, let's take a look at this case when we<br>have a chance.&nbsp;&nbsp;It's quite similar to the target substitution magic we're
<br>working on right now for mv:generate.&nbsp;&nbsp;The template being processed already<br>provides some info about what the directive should produce and it would be<br>nice if the author didn't have to repeat the image asset's name.&nbsp;&nbsp;
e.g. some<br>sort of mv:image=&quot;{this_src}&quot; notation, if we can specify a sensible rule<br>about how to determine the relevant portion of the &lt;img&gt; tag's existing src<br>attribute to use in the generated output.
<br><br>(?? mv:image_tag=&quot;{src_filename}&quot; notation could work for images directly<br>contained in the std rails public/images dir; not sure how far to push on<br>trying to automagically determine a relative path name w/in the images dir,
<br>there are issues of nesting in the template src dir that make ugly .. paths<br>like the above tricky)<br><br>~ Deb<br><br><br>_______________________________________________<br>Masterview-users mailing list<br><a href="mailto:Masterview-users@rubyforge.org">
Masterview-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/masterview-users">http://rubyforge.org/mailman/listinfo/masterview-users</a><br></blockquote></div><br>