Using more new sizes will increase the number of files into your site host. WARNING: As, by default WordPress is generating 3 customizable image sizes, it's creating 4 files for each images. If you want to use your new size, use: the_post_thumbnail( 'portfolio' ) //as I named my size as 'portfolio' Typically we can call different Featured Image into any place of our theme by using: the_post_thumbnail( 'medium' ) //it will display only the medium size of the original image 300 (in px) $crop: boolean write true if you want to hard-crop the image, otherwise use false 500 (in px) $height: integet write the height you want, i.e. 'portfolio' $width: integer write the width you want, i.e. Where - $name : string write the name within single quote, i.e. Use the function into your functions.php to add your desired image size: add_image_size( $name, $width, $height, $crop ) Using add_image_size() function with your desired parameter allows you to add new size for your site. But if you still need a new size other than the three, WordPress allows you to add new image sizes too. So you can still use the default sizes for your custom purpose. So, with uploading the Original image there would be at least 4 files-Īs you already know that, from /wp-admin/options-media.php, you can change the default size's dimensions too. It's to ensure site speed with different sizes where necessary. WordPress by default is designed to generate 3 types of cropping of any uploaded images (Media):
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |