WordPress image crop probems

You don’t need to do manual cropping; just create a custom image size, and WordPress will perform the cropping on image upload. e.g. in functions.php: add_image_size( ‘portfolio-thumbnail’, 214, 187, true ); Then in your portfolio template, inside the Loop: the_post_thumbnail( ‘portfolio-thumbnail’ ); (I assume you know how to handle the rest of the output, such … Read more

wp_get_attachment_image_src on multisite

wp_get_attachment_image_src() function returns an array that’s why your code isn’t working. Try the following code. <a href=”https://wordpress.stackexchange.com/questions/295180/<?php echo esc_url( home_url(“https://wordpress.stackexchange.com/” ) ); ?>” rel=”home”> <?php if ( get_theme_mod( ‘bwpy_logo2’ ) ) : $img_data = wp_get_attachment_image_src( absint( get_theme_mod( ‘bwpy_logo2’ ) ) ); $img_url = isset( $img_data[0] ) ? $img_data[0] : ”; // Or you can try … Read more

Getting Different Size Of Attachment Images

Since you have defined the featured image for each post with using <?php the_post_thumbnail( ‘custombig’ ); // or another custom size name ?> should be enough, for info you can read: http://justintadlock.com/archives/2009/11/16/everything-you-need-to-know-about-wordpress-2-9s-post-image-feature http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/ Or here there is good info too: How wordpress handle upload images and how to use them in the code

Mass crop images: Landscape images -> Portrait images

In media settings change: Crop thumbnail to exact dimensions (normally thumbnails are proportional) to unchecked. This will fix the problem on new images. For old already imported images, you’ll need to regenerate them. There are many plugins that can do this. This plugin is well known: http://wordpress.org/extend/plugins/regenerate-thumbnails/

WordPress images not cropping properly

It sounds like your problem occurs before the image is cropped/ resized and displayed in the page – the original image is too small. You can require minimum dimensions for uploaded images, see: How to Require a Minimum Image Dimension for Uploading? Then, to resize the uploaded image without cropping it, define the image size … Read more