Thumbnail is corrupt but image is good

You may need to reset the thumbnail settings in your media settings, then regenerate the thumbnail; either: use Regenerate Thumbnails plugin to rebuild all thumbnails; or edit image / rotate it left / rotate it right (back to original) / save image

WordPress 3.5 – Add custom image size

You can pest following code in function.php. add_theme_support(‘post-thumbnails’); add_image_size( $name, $width, $height, $crop); add_image_size(‘Home Top’, 120, 120, true); add_image_size(‘Home bottom’, 270, 90, false); add_image_size(‘Archive thumb’, 150, 75, true); add_image_size(‘Special’, 397, 224, true); add_image_size( ‘Test cropped’, 500, 500, true ); function sgr_display_image_size_names_muploader( $sizes ) { $new_sizes = array(); $added_sizes = get_intermediate_image_sizes(); foreach( $added_sizes as $key => … Read more

Getting specific image thumbnail urls of attached images

Have a look at wp_get_attachment_image_src <?php $attachment_id = 8; // attachment ID $image_attributes = wp_get_attachment_image_src( $attachment_id, ‘medium’ ); // returns an array if( $image_attributes ) { ?> <img src=”https://wordpress.stackexchange.com/questions/169475/<?php echo $image_attributes[0]; ?>” width=”<?php echo $image_attributes[1]; ?>” height=”<?php echo $image_attributes[2]; ?>”> <?php } ?> Source: http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src#Default_Usage

Store thumbnails and uploads in different directories?

It appears that the thumbnail URLs are generated relatively to the upload folder. So trying to store them outside the uploads folder is not going to be a good idea. There are hacks to filter the output for functions such as the_post_thumbnail_url(), but considering side issues such as the thumbnails not being able to be … Read more

Completly disable and remove Thumbnails?

To remove all extra image sizes you use get_intermediate_image_sizes() in tandem with remove_image_size(). E.g. function remove_extra_image_sizes() { array_map( ‘remove_image_size’, get_intermediate_image_sizes() ); } add_action(‘init’, ‘remove_extra_image_sizes’); To edit the image size dropdown you can hook a custom function to image_size_names_choose filter. function filter_image_size_names_choose($size_names) { return array_filter( $size_names, function( $size_name ){ return ‘full’ === $size_name; }, ARRAY_FILTER_USE_KEY ); … Read more

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