-
Original reference: details
-
Thumbnail: thumbnail size; -
Medium: medium; -
Large: large size; -
Medium_large: a fixed width of 768 and unlimited height;
-
Thumbnail size is set to 0, which means thumbnail clipping is disabled -
Medium, the width is set to 768, and the height is 0 (unlimited), which means that the width shall prevail, and the height adaptively adjusts the scaling, while keeping the default medium_large_size_w =768 is consistent, sharing one drawing -
Large size, which is set to 0, means that large image clipping is disabled -
medium_large, Enter the WP database and search the wp_options table medium_large_size_w You can see.
Disable automatic cropping of thumbnail pictures
-
Code source: details
Step 1:
Step 2
Step 3
//Disable automatically generated picture sizes function shapeSpace_disable_image_sizes($sizes) { unset($sizes['thumbnail']); // disable thumbnail size unset($sizes['medium']); // disable medium size unset($sizes['large']); // disable large size unset($sizes['medium_large']); // disable medium-large size unset($sizes['1536x1536']); // disable 2x medium-large size unset($sizes['2048x2048']); // disable 2x large size return $sizes; } add_action('intermediate_image_sizes_advanced', 'shapeSpace_disable_image_sizes'); //Disable zoom dimensions add_filter('big_image_size_threshold', '__return_false'); //Disable other picture sizes function shapeSpace_disable_other_image_sizes() { remove_image_size('post-thumbnail'); // disable images added via set_post_thumbnail_size() remove_image_size('another-size'); // disable any other added image sizes } add_action('init', 'shapeSpace_disable_other_image_sizes');