changing generated html for images from the_content (2 posts)

  1. Chris Laursen
    Posted 5 years ago #

    I want images on my pages & posts to not have height and width declarations in the html. How can I strip this code from the_content?

    this is my page.php code:

    <?php get_header(); ?>
    <?php while (have_posts()) : the_post(); ?>
      <?php the_content(); ?>
    <?php endwhile;
    get_footer(); ?>

    this is the relevant generated code for one page:

    <p><a href="http://alexandrarothwell.com/wp-content/uploads/2011/04/blueyeller.jpg"><img class="aligncenter size-large wp-image-117" title="blueyellerreal" src="http://alexandrarothwell.com/wp-content/uploads/2011/04/blueyellerreal-239x800.jpg" alt="" width="239" height="800" />
    	<h1>ventilator blues</h1>

    so how can i get rid of the width and height text?


  2. phe.le
    Posted 5 years ago #

    Go to Posts or Pages and remove them in HTML.

Topic Closed

This topic has been closed to new replies.

About this Topic