[img]http://example.com/screenshot.png[/img] will produce this HTML output: <img src="http://example.com/screenshot.png" alt="" class="bb-image" /> wich will display the image file http://example.com/screenshot.png.
But the result is not accessibility-compliant... When images displaying is disabled for the browser the result either has no meaning or is ugly. Same thing within my text-browser exept if configured to show images URL instead of their name...
So, i thing that output should be <img src="http://example.com/screenshot.png" alt="image@ http://example.com/screenshot.png" class="bb-image" /> :-)

If you agree with that first step, now have a close look at [img]http://example.com/screenshot.png[/img] and compare with [url]http://example.com/[/url] whose output is <a href="http://example.com/" class="bb-url">http://example.com/</a> (yes, A use a closing tag, but IMG a standalone one ; exept that they are similar).
The URL tag has a second syntax: [url=http://example.com/]the example site[/url] (rendered this way: <a href="http://example.com/" class="bb-url">the example site</a>)... By the same way, can't we have the same for IMG: [img=http://example.com/screenshot.png]the screenshot[/img] (rendered this way <img src="http://example.com/screenshot.png" alt="the screenshot" class="bb-image" />)?
+1 for accesibility :-)

One feature of this module is that one can speciy the desired display dimensions of the image: [img=640x480]http://example.com/screenshot.png[/img]. As this is not recommanded, this bad stuff should be removed!
...Or it should be a second parameter (i use the semi-colon as a separator here because it cannot be in a correctly encoded URL i think): [img=http://example.com/screenshot.png;640x480][/img]

This should be applyed to flash animations also : [flash=300x200]http://example.com/movie.swf[/flash] should be rendered <object type="application/x-shockwave-flash" data="http://example.com/movie.swf" width="300" height="200"><param name="movie" value="http://example.com/movie.swf"" /><param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" /> <a href="http://example.com/movie.swf">flash-animation@ http://example.com/movie.swf</a></object> (we provide a the direct for download if the plugin is not installed).
Better then code>[flash=300x200;http://example.com/movie.swf]image and description for people who cannot view the embeded anim...[/flash] (just an idea)

Comments

gilcot’s picture

Status: Active » Closed (fixed)

I suggested [img=url]alt text[/img] but i've discored later the implementation [img=alt text]url[/img] : whao, so much improvements since 4.7.. it's just a pity it's not mentioned in the help as this is more important thant the ability to resize the image..