WordPress.org

Ready to get started?Download WordPress

Forums

Insert images without reference, alt, dimensions or class (3 posts)

  1. zPavan
    Member
    Posted 1 year ago #

    Hi everyone!

    I have a little problem, but no ideas how to solve it!

    When i insert an image using "Media uploader" I get this code:

    <img src="image_direct_link" alt="Title" width="600" height="450" class="alignnone size-full wp-image-1884" />

    I would rather get this result:

    <img src="image_direct_link" />

    how can i do this?

  2. cyclopse
    Member
    Posted 1 year ago #

    @zPawan when u upload an image then u will get its link just copy it and paste it in place of image name

    <img style="float: left;" alt="image name" src="image name"/> and u done u can choose such as i chsose float with left .

  3. Dan Rossiter
    Member
    Posted 1 year ago #

    Why in the world would you rather have a bare img tag? First of all, the alt parameter is a required attribute by the W3C standard. Second, the width and height parameters, though not required, make the page load much more efficiently. Third, the classes appended to the image make sure that it inherits all of the styling from your active theme.

    Stripping these attributes would be a terrible idea and I would strongly urge you to reconsider whatever it is that you are trying to achieve.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.