• Hello all,
    I was wondering two things concerning image-resize. One, when I add an images to a post that is too big for the post container is there any script/plugin that will scale to fit the aspect ratio of the post width/height?

    Secondly, @ https://www.georgehajian.co.nz/wordpress I have the latest post filtering through using some php. Now is it possible that if that post as an image for me to take that image, resize it to fit that teaser post div and add then add it as an img/div tag?

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • In Settings > Media you can set image sizes for Thumbnail, Medium, Large and WordPress will convert your images to those sizes. Some plugins do also have a checkbox to resize images that are too large so they fit the screen. It’s best though not to upload overly large images.

    Try setting your thubmnail size and adding the thumbnail.

    Thread Starter auan

    (@auan)

    Thanks for you reply Minnow.

    I have addded some code to my functions.php from here, and then added

    <div id="image">
    <?php post_thumb();?>
    </div>

    where I wanted the image to be displayed in my Home page teaser post.

    I then uploaded pages.php and functions.php to my server went to go add an image in a post I get this php error spat out at me.

    Warning: Cannot modify header information – headers already sent by (output started at /usr/home/georgeha/domains/georgehajian.co.nz/public_html/wordpress/wp-content/themes/Hajian 1.0/functions.php:29) in /usr/home/georgeha/domains/georgehajian.co.nz/public_html/wordpress/wp-includes/pluggable.php on line 868

    Any knowledge of what this would mean?

    The “headers already sent” message is usually caused by spaces in the code where they don’t belong. You can search the docs & forums for info about that. It’s also not great that your theme folder name has a space and a period (dot) in it.

    Thread Starter auan

    (@auan)

    Okay I fixed that problem by installing this plugin. The only problem that seems to be happening now is that the plugin’ doesn’t seem to be grabbing the image from my post.

    The code inserted into page.php to call the plugin’ is

    <?php images('1', '171', '114', 'alignleft', false); ?>

    Sorry, I don’t know anything about that plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Resizing images for posts’ is closed to new replies.