Resize uploaded images [duplicate]

I use a plugin called AJAX Thumbnail Rebuild. It goes through all of the images in your media library and re-sizes them based on any image sizes registered (including the defaults and anything added with add_image_size()). It only runs when you manually request it and you can tell it to only rebuild certain sizes if … Read more

Outputting content from page

wp_get_attachment_image_src returns an array, not a single value. Please refer to this article for more info: wordpress.org/Function_Reference/wp_get_attachment_image_src Default Usage <?php $attachment_id = 8; // attachment ID $image_attributes = wp_get_attachment_image_src( $attachment_id ); // returns an array ?> <img src=”https://wordpress.stackexchange.com/questions/87552/<?php echo $image_attributes[0]; ?>” width=”<?php echo $image_attributes[1]; ?>” height=”<?php echo $image_attributes[2]; ?>”>

Featured Image keeps cropping

add_action( ‘wp_enqueue_scripts’, ‘brian_scripts’ ); if ( function_exists( ‘add_theme_support’ ) ) { add_theme_support( ‘post-thumbnails’ ); set_post_thumbnail_size( 214, 9999, false ); add_image_size(‘large’, 500, 9999, true); //custom size } This code is in your functions.php? The docs for add_theme_support() suggest to only use it in the functions.php of the theme or attach it to the after_setup_theme hook. Also … Read more

Resizing old post thumbnail images

I’ve figured this out. Appears as though I really wanted add_image_size(‘post’, 475, 475, true); and then reran the Regenerate Thumbnails plugin. After sorting out a permissions error on /wp-content/uploads, this worked great. Then in my theme, I just displayed this image size for the post thumbnail. the_post_thumbnail(‘post’);

How to add thumbnails to posts and pages automatically in a uniformed fixed elegant way?

You should take a look at your Media Settings, to define the dimensions of your post thumbnails. Additionally, you could add this code to your functions.php to specify your own thumbnails and dimensions: // add thumbnail theme support add_action(‘after_setup_theme’,’tjnz_theme_support’); function tjnz_theme_support() { add_theme_support(‘post-thumbnails’); // wp thumbnails set_post_thumbnail_size(170, 170, true); // default thumb size add_theme_support(‘automatic-feed-links’); // … Read more