![]() If not, feel free to skip to the next chapter! If you’re interested in the code behind what’s happening when the additional image sizes are created then this section of the article is for you. The rest of the images that were generated are a result of some WordPress core files and the Twenty Twenty theme’s code. So, that is why for example the ‘Medium size’ is 300×169 instead of 300×300. The ‘Medium size’ and ‘Large size’ have been resized in a manner that avoids changing the actual proportions of the image. Having uploaded this image via the WordPress Media Library we can connect to our site using an FTP client and, if we head to the Upload folder, we’ll see that multiple versions of our images have been created. It is 294KB in size and measures 2089×1175 pixels and we are going to do this with the default WordPress Twenty Twenty theme active (other themes may alter how images are handled by WordPress). For the purposes of this example we are going to upload an image with the name ‘post1-feature-image’. Let’s run through an example so you can see exactly what goes on ‘behind the scenes’ when you upload an image to WordPress. Examining WordPress Image Sizes in More Detail This is done so the image used both a) looks good and b) loads quickly. These sizes along with additional sizes we will later look at are used by WordPress in various positions in the frontend layout. These are ‘Thumbnail size’, ‘Medium size’ and ‘Large size’ with dimensions of 150×150 pixels, 300×300 pixels (maximum) and 1024×1024 pixels (maximum) respectively. Finally it will also store a ‘Full size’ image which is the original size of the uploaded image. It does this by creating 3 different image sizes each time you upload an image to the WordPress Media Library. WordPress tries to strike a balance by serving up the optimal image size depending on the location of the image.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |