Force square image crop during upload?

Your assumption that all images are uploaded from a browser is false. Currently images can be uploaded via the XML-RPC protocol and once the REST API will be merged it will also be used to upload images. Images can also be imported from other sites. The point is that you should not assume that images … Read more

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/

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)