WordPress.org

Ready to get started?Download WordPress

Forums

auto reduce picture size (4 posts)

  1. freemelo
    Member
    Posted 2 years ago #

    I am a new wordpress blogger, i want to enable a feature in wp that when i insert a image inside a post the image size should automatically reduces to maximum width of 640 pixels ( if the width is more then 640pixel otherwise leave it )
    my blog adress is http://www.freemelo.com/ please suggest me a procedure to do that

    P.S. i want to reduce the image size instead of resizing the image bbia html code.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Try adding:

    // set content width
    	if ( ! isset( $content_width ) ) $content_width = 640;

    to the top of your theme's functions.php file. You can also set a mix-width on images using CSS.

  3. freemelo
    Member
    Posted 2 years ago #

    but it will not reduce the height in same propotion

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    You could try using height:auto; but ultimately this is not something that can be handled by coding for all images.

Topic Closed

This topic has been closed to new replies.

About this Topic