{"id":872,"date":"2018-10-18T16:48:21","date_gmt":"2018-10-18T11:18:21","guid":{"rendered":"https:\/\/awpguide.com\/?p=872"},"modified":"2018-10-18T16:48:21","modified_gmt":"2018-10-18T11:18:21","slug":"how-to-add-additional-image-sizes-in-wordpress","status":"publish","type":"post","link":"https:\/\/awpguide.com\/wp-guides\/how-to-add-additional-image-sizes-in-wordpress\/","title":{"rendered":"How To Add Additional Image Sizes In WordPress"},"content":{"rendered":"

Last time, we have shown you how to add additional CSS<\/a> on your website. After publishing that tutorial, one of our users asked about adding additional image sizes in WordPress. In this post, we are going to show you how can you add additional image sizes in WordPress.<\/p>\n

Most theme authors will add specific image sizes in their WordPress themes. In case if you need to add a custom size of the image, you can follow this tutorial.<\/p>\n

How To Add Additional Image Sizes In WordPress<\/h2>\n

First of all, log in to your WordPress dashboard and go to the theme editor.<\/p>\n

\"Add<\/p>\n

There, you need to choose the functions file.<\/p>\n

\"wordpress<\/p>\n

Copy the below code.<\/p>\n

\r\nadd_theme_support( 'post-thumbnails' );\r\n<\/pre>\n

Paste it on the functions file. If the code is already on your functions file, you don’t need to add it.<\/p>\n

Now, let’s create additional image sizes on the website. You need to copy the below code.<\/p>\n

\r\nadd_image_size( 'sidebar-thumb', 120, 120, true ); \/\/ Hard Crop Mode\r\nadd_image_size( 'homepage-thumb', 220, 180 ); \/\/ Soft Crop Mode\r\nadd_image_size( 'singlepost-thumb', 590, 9999 ); \/\/ Unlimited Height Mode\r\n<\/pre>\n

Paste it on the functions file and update the file. Tweak the above code according to your needs. Mainly the size. While editing the functions file, make sure that you are using a WordPress child theme<\/a>.<\/p>\n

Regenerating Thumbnails<\/h2>\n

Once you have added the code in your functions file, you need to regenerate thumbnails. It will help you to generate a fresh copy of your older images with the specific sizes.<\/p>\n

Go to add new plugins section and install Regenerate Thumbnails<\/a> plugin.<\/p>\n

\"install<\/p>\n

After that, activate the plugin.<\/p>\n

\"activate<\/p>\n

You can find the plugin settings under tools. Also, you can see the all available image sizes.<\/p>\n

\"regenerate<\/p>\n

You need to regenerate all thumbnails.<\/p>\n

\"regenerate<\/p>\n

Within a short time, the plugin will regenerate thumbnails for you. If you have so many images, it will take some time.<\/p>\n

\"image<\/p>\n

You are done! This is how you can add additional image sizes in WordPress and regenerate existing thumbnails.<\/p>\n

We hope you found this post helpful and enjoyed the read. If you did, please consider sharing this post with your friends and fellow bloggers. For more related posts, you may want to check out our blog section<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

Last time, we have shown you how to add additional CSS on your website. After publishing that tutorial, one of our users asked about adding additional image sizes in WordPress. In this post, we are going to show you how can you add additional image sizes in WordPress. Most theme authors will add specific image… Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":936,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/posts\/872"}],"collection":[{"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/comments?post=872"}],"version-history":[{"count":0,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/posts\/872\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/media\/936"}],"wp:attachment":[{"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/media?parent=872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/categories?post=872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/awpguide.com\/wp-json\/wp\/v2\/tags?post=872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}