[wp-hackers] Why are <img> tags inserted into posts?

John Blackbourn johnbillion+wp at gmail.com
Wed May 20 00:31:42 UTC 2015


There isn't really a "history" to this, and there certainly wasn't a
design decision. It's just how it is. Shortcodes weren't introduced
until version 2.5, four years after version 1.0.

Along with root-relative URLs, this gets brought up from time to time,
for example https://core.trac.wordpress.org/ticket/11394. There's not
much benefit to an img shortcode over an img tag, and there are
downsides such as (as you pointed out) additional database queries.

John

On 19 May 2015 at 21:25, MikeD <mike at codenamemiked.com> wrote:
> I'm wondering why an actual HTML <img> link is embedded into a post when inserting an image, as opposed to a shortcode such as
>
> [img id=123 size='medium' alt='alt']
>
> or something similar that would make site-wide changes to image sizes etc easier. Is it just the DB hit or was there some other reason? I'd love to read the history of this if it exists somewhere.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list