Wordpress Codex

Worldpress Codex

role The bleed behaviour for the picture resize depends on the value of $crop: When wrong (default), the pictures are resized and not trimmed. Pictures are trimmed to the specified sizes within the trim area. Press ing the button to select the desired position. If correct, the pictures are trimmed to the specified sizes using centre position. Page (String) (Required) Picture Sizer.

The ( int ) (Required) width of the picture in pixel. The ( int ) (Required) picture size in pixel. Optionally {Boool|array} Whether you want to cut your pictures to a certain width and size or adjust their size. Arrays can define the position of the harvest area. globally $_wp_additional_image_sizes; 'width' => absint( $width ), 'height' => absint( $height ), 'crop' => $crop, ); 2.9.

If necessary, however, you can always customize the settings yourself: update_option('thumbnail_size_size_w', 160 ); update_option('thumbnail_size_h', 160 ); update_option('thumbnail_crop', 1 ); adjust the picture resize by changing the proportional resize of the picture (without skewing it): add_image_size('custom-size', 220, 180 ); adjust the picture resize by trimming the picture (without displaying any part of it):

Add_image_size ('custom-size', 220, 180, true ); Sets the picture height by trimming the picture and specifying a trim position: Add_image_size('custom-size', 220, 220, 220, array('left','top')); When trimming a picture, the first value in the matrix is the trim height of the x-axis, the second is the trim height of the y-axis.

Per default, those are set to'Centered' by default when using Hardware Viewing. Here you can find samples of the different harvest varieties. After you have specified some customized picture size, there are many ways to use them. Hint: To activate the presented pictures, the actual themes must contain add_theme_support('post-thumbnails'); in its function. pdf files.

Just use wp_get_attachment_image().   echo wp_get_attachment_image_image( 42,'your-custom-size'); Note: If you only want the picture url instead of a ready-made one, you can use wp_get_attachment_image_image_src() instead. If you use the'false' option, a new picture will not be created in the up-load folder if one of the picture sizes of the up-loaded picture is the same as the new picture file format.

When removing a registred picture resize from a function. If you upload a picture before that time and then delete it from the libraries, the automatically created resizes will not be erased as well. It only deletes picture resizes that already existed in function phtp. Even though they are not necessary parameter settings, their defaults (0) cause undesirable behaviour, so be aware that you should always use them.

Again, use a value of 9999 to specify the different size from the one to take into account when resizing the screen.

Auch interessant

Mehr zum Thema