﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
11394,Image shortcode,caesarsgrunt,,"Add a shortcode for images, rather than inserting static html code into posts/pages.

This complements the media stuff being done in 3.0 and has many benefits, including[[BR]]
* allowing images to be trashed[[BR]]
* allowing plugins and themes to modify the code used to show images[[BR]]
* removing broken img tags from posts when the image is deleted[[BR]]

As discussed on dev chat 10-12-2009.

'''Proposed syntax''' :[[BR]]
''Shortcode name'' : {{{image}}}[[BR]]
''Required attributes'' :[[BR]]
* {{{id}}} - the id of the image[[BR]]
''Optional attributes'' :[[BR]]
* {{{align}}} - {{{left|center|right}}} - default to none (inline)[[BR]]
* {{{size}}} - {{{thumb|medium|full}}} - default to {{{thumb}}}[[BR]]
* {{{title}}} - HTML title/alt attribute - default to value in db[[BR]]
* {{{width}}} - HTML width attribute - default to width of image[[BR]]
* {{{height}}} - HTML height attribute - default to height of image[[BR]]
Other attributes are probably also needed, but I can't think of any more at present.

Captions would be handled by the existing caption shortcode.

Other media which is embedded straight in the post would need its own shortcodes (eg {{{[video]}}}), but at the moment other media seems always to only be linked to anyway.[[BR]]
A single {{{[media]}}} shortcode wouldn't be a good solution since every type of media has different attributes and needs to be handled differently.

This solution is backwards-compatible, in that existing image would continue to work, but it ''might'' be nice to update existing images to use the shortcode as part of the upgrade process.",feature request,closed,normal,,Media,2.9,normal,wontfix,,pavelevap@… scribu@… peterchester mhbarr sbressler
