WordPress.org

Ready to get started?Download WordPress

Forums

Height and width variables automatically added to images (4 posts)

  1. Hannes
    Member
    Posted 7 years ago #

    I think it would be logical that the "height" and "width" variables would be automatically inserted into the img code when you send an image to the editor (through the upload manager).

    Is it possible to add this to the next update?

    - Hannes

  2. DianeV
    Member
    Posted 7 years ago #

    I very much agree with this -- it's a must for convenience, and for people who don't "do" code.

  3. Hannes
    Member
    Posted 7 years ago #

    Yeah, and even if you do code it saves you a lot of time.

    Any news on whether this could be a part of the next update?

    - H.

  4. Doodlebee
    Member
    Posted 7 years ago #

    Actually, it's not necessary anymore to use them. WordPress uses valid XHTML - and "height" and "width" - although they are acceptable - are not necessary for images. That's why it's not in there.

    "height" and "width" for images were used back in the day when many people were using old methods to lay out sites. Many browsers (we're talking IE4, NN4, etc) would load text first, then images. So it was jarring to start reading a site and suddenly have an image pop in and move text around. So people started using the "height" and "width" to images so, at the very least, the browser would allow for that space while loading the page.

    It's no longer necessary - allowed, but deprecated. Therefore, I don't see it being added in as part of WP. If you really wanna put it in, you can. But you don't need it, so no need to bloat the code.

Topic Closed

This topic has been closed to new replies.

About this Topic