[resolved] How do I resize images? (4 posts)

  1. Archie22is
    Posted 3 years ago #

    Hi guys,

    I am currently using the following method to display images in a loop:

    <span class="company-logo">
    	$company_logo = get_post_meta($post->ID, 'company_logo', true);
    	$logo = wp_get_attachment_url( $company_logo['ID'], 'thumbnail' );
    	# resize image before print
    	echo( "<img src=\"$logo\"[0] width=\"250\" height=\"120\" />" );

    However the logo size is not constant throughout the output. I want the all the images to resize to a width of:
    Width: 250px;
    Height: 120px;

  2. brettshumaker
    Posted 3 years ago #

    Can you provide a link to the site? It's hard to tell what's going on without it.

  3. esmi
    Forum Moderator
    Posted 3 years ago #

    Insert the correct dimensions and check "Crop thumbnail to exact dimensions (normally thumbnails are proportional)" in Appearance -> Media and then run http://wordpress.org/extend/plugins/regenerate-thumbnails/

  4. Archie22is
    Posted 3 years ago #

    Hi guys,

    Thank you very much for your assistance. I eventually followed some steps for a reply on: http://podsframework.org/forums/topic/image-resize/#post-173291

Topic Closed

This topic has been closed to new replies.

About this Topic