Rebuild thumbnails in WordPress
06.01.2022 11:19 1345 Displayed

Rebuild thumbnails in WordPress

When you edit a WordPress theme, your existing images may not be the appropriate size.

WordPress solution? Update the thumbnail. This means resetting your image template in the basic WordPress settings. It can also be done using quick plugs.

In this article, we will delve into the WordPress update plugin solution and show you how to use the Regenerate Thumbnails WordPress plugin to fix image issues and manually use WP-CLI.

What will happen to your photos

To learn how to recreate a template in the WordPress style, you first need to understand how images and image sizes are generated.

WordPress has a setting to automatically cut the images you upload. The settings can be found under Settings> Media in the admin panel.

Rebuild thumbnails in WordPress | Atak Domain Hosting

WordPress will automatically crop your image.

On the "Media Settings" page, there are standards for "Small", "Medium" and "Large". You can update the number of pixels per pixel as needed.

However, please remember that if you want to update the settings, click Save Changes at the bottom of the page.

Here are some customizable growth options:

  • Thumbnail-150 pixels x 150 pixels
  • Medium-600 pixels x 600 pixels
  • Large-1024 pixels x 1024 pixels

Please note that the theme you are using may have images of a certain size, and these images will follow the options on the Media Settings page. If you move a new theme, the settings will be updated with the values ​​introduced by the new theme.

However, the old photos you have uploaded are invalid.

This is where things get a little tricky. You need to enlarge all the uploaded images to operate according to the size of the new uploaded image. Unfortunately, there is no setting to do this.

The solution is to do a so-called "small recovery".

When you are editing a WordPress theme, your existing images may not be sized properly.

How to change the size of thumbnails in WordPress? (3 methods)

Before you go back to how to recreate an image in WordPress, it is important to determine how the image size can be changed in the WordPress dashboard.

Perhaps more importantly, this solution does not require changing the size of the old image, so you still need to switch to WordPress without having to recreate the widget or use other plugins.

If you want to change the small size or image, there are three main methods:

1. Adjust the image size in the theme

2. Create an image in the media library

3. Adjust the image size in the media settings

1. Adjust the image size in the theme

Because your WordPress theme can adjust the size of custom images, you can choose to resize the theme, or you can check whether there is a setting to adjust the size of a specific image.

Every theme is different, so be sure to check the related documentation to see if there is a way to change the image size of the theme without having to set a completely different theme.

Alternatively, you can choose to create a sub-theme and use PHP code to change the image size.

2. Create an image in the media library

Another option is to resize the image by cropping the image in the media library.

step 1

Go to Media> Library in the WordPress admin dashboard.

You can change the size of the images in the media library.

Next, click on the captioned image you want to enlarge.

In the pop-up window, click the "Edit Image" button.

Rebuild thumbnails in WordPress | Atak Domain Hosting

Click the button below the image to edit it.

Step 2

After that, you have several options to change the image.

You can click on the image and drag the mouse to the image, then release the mouse after selecting the area you want to leave. Next, you can buy it on Crop.

If you want to cut the image correctly, you can adjust the aspect ratio by entering the desired ratio.

For example, you can use 1:1 to create a frame, or you can use 4:3, 16:9, and any other ratios you want.

Then, when you hover over the image, hold down the shift key. When you select the part of the image you want to leave. You can click on it and rotate the option to cut the right part of the desired image.

If you do not get the image size you originally wanted, you can also select and drag the selection corner.

Alternatively, you can make a selection and enter the actual size (in pixels) of the desired image in the selection area below the image selection on the right.

When finished, click Crop and then click the Save button.

Step 3

If you resize the image instead of deleting it, you can enlarge the image in the settings on the right.

The size of the image to be written, and then click "Zoom".

Rebuild thumbnails in WordPress | Atak Domain Hosting

You have several options to change the size of the image.

the fourth step

You can also select the standard image settings you want to change under the thumbnail settings.

You can choose to apply your settings to:

  • All image sizes
  • Thumbnail
  • All sizes except small

3. Adjust the image size in the media settings

This is helpful if you only need to change one or two images, but if you want to change the size of all images, it is best to do so through the settings page.

step 1

In your management dashboard, go to "Settings"> "Media."

Rebuild thumbnails in WordPress | Atak Domain Hosting

 You can adjust the custom image size on the media settings page.

Step 2

Write the new size you want for all small, medium or large images. According to your needs, width and height, write only one type of image, or all.

If you want to change the size of the image to a disproportionate size, check the "Thumbnail Size" section in the "View Size" box to get the correct size.

Step 3

Next, if you don’t want all your new photos to be organized in the upload folder, you can organize my upload box in the month and year folders.

Want to know how we increased traffic by 1000%?

Receive my weekly newsletter with over 20,000 people, which includes a built-in WordPress plugin!

If you are satisfied with the settings, click the "Save Changes" button at the bottom of the page.

How to rebuild thumbnails in WordPress

After changing these settings or changing the theme, if the image on the public site is not updated, you must recreate the thumbnail as described earlier.

One of the easiest ways is to use the free WordPress plugin Regenerate Thumbnails to quickly correct the images you uploaded earlier.

This plugin is also compatible with WooCommerce.

step 1

First, install and activate the regenerate thumbnail plugin.

Next, go to "Tools"> "Regenerate Thumbnails", you can find settings related to WordPress images here.

Rebuild thumbnails in WordPress | Atak Domain Hosting

 You can also adjust the small, medium and large image size.

Step 2

By default, the option to reset existing plugs to the correct size is selected. Uncheck this box to use the thumbnail update plugin to correct all your photos.

However, if you want to save server resources, please check.

If you have updated certain dimensions of the image, such as your theme, this is recommended. You can also select the box at the bottom of this option to delete small files of old unregistered size. Select it to free up space on the server.

Before choosing this setting, make sure you don’t need these images. If some images are used on your site and you select this option, they will be deleted and will no longer be displayed on your site. Visitors will see a broken picture.

You can also see the post content update checkbox, where you can choose whether you want to update the image you are currently using in the post.

Step 3

After selecting the desired option, click the button to recreate the dimensions, including medium, large, and new file size.

Next, wait for the process to complete. Depending on the number of pictures on your website, this may take a while, so pour a cup of coffee or a glass of water while you are not waiting. For large websites on high-performance servers, it usually only takes a few seconds.

You will see the "Everything is done!" message when the process is complete.

That's it.

Your samples and photos should be updated immediately.

Struggling with ongoing problems with WordPress? Atakdomain is a hosting solution built on performance and security! View our plan

How to force a thumbnail

You can also use the Force Regenerate Thumbnails plugin as an alternative. As can be understood from the above, it eliminates minor updates by deleting the size of the old image, so WordPress is forced to recreate the image. This add-on is also compatible with the WooCommerce online store.

Please note that at the time of release, this plugin has not been updated for the last 3 major versions, so please use it with caution. Before using it in real time on your site, make sure to test it in a test environment or a local environment.

The reason you need to use this plugin on the Regenerate Thumbnails plugin is that the latter will only change the size of the image, and unless you check this option, it will not delete the old image size.

However, if you find it annoying, you can try to force the thumbnail to be regenerated.

step 1

To force WordPress to recreate templates, please install and enable the Force Regenerate Thumbnails plugin.

Next, go to Tools> Force Regeneration of Thumbnails in the WordPress admin panel.

Rebuild thumbnails in WordPress | Atak Domain Hosting

 You can force reset with just one tap.

Step 2

To delete all images enlarged with the old settings and force WordPress to recreate small images, click the "Restore All Thumbnails" button.

After a while, the size of the photo will change. If you have a smaller website, this takes almost no time, but for a large website with a lot of images, it may take a while.

Recover private photos

Maybe use the situation that does not need to rebuild all the children, but only need to rebuild some special ones. Although the Regenerate Thumbnails plug-in is still installed, you can still do this. How is this.

step 1

Go to Media> Library. To view the network, click on a specific image.

By default, the media library is located in the network view.

Step 2

Then on the right, click the Update Thumbnail button.

Rebuild thumbnails in WordPress | Atak Domain Hosting

 You can recreate the small in more detail.

If you are browsing the media library in the title view, click Regenerate the thumbnail chain after opening the image you want to update.

Rebuild thumbnails in WordPress | Atak Domain Hosting

 Purchase a chain to recreate the small chain in the portal view.

Rebuild the thumbnail using WP-CLI

If you don’t want to use a plugin, there is another WordPress solution: use WP-CLI to do this by manually updating the plugin without the plugin.

Note that for this option, you need to access the command line on the server.

Minimizing updates using WP-CLI is a better choice than using WordPress plugins because it is faster and not subject to HTTP restrictions and time constraints.

The basic commands for small recovery are as follows:

Update wp media

After inputting, press "y" on the keyboard and input "yes" to confirm that you want to recreate all the images.

Update all thumbnails using WP-CLI

After downloading the command line, you can enter the following command in WordPress to recreate the error in a few seconds without a plugin:

Update wp media --er

With this command, the sample will be updated again without manual approval.

Recreate custom thumbnails using WP-CLI

You can also choose to create a custom thumbnail using WP-CLI and the image ID to be updated.

This is the command to do this:

wp update media 12 34 567

Just make sure to replace the three example IDs-"12", "34", and "567" with the actual IDs of the specific image you want to refresh.

You can enter any number of identities. Be sure to separate each of them in one place.

When you change the theme, you may feel uneasy because the photos are not displayed correctly.

Fortunately, WordPress has two quick solutions. With the help of the Regenerate Thumbnails plug-in, it can be done in just a few clicks. Or, you can use WP-CLI to make coffee in a shorter time.


Save time, money, and improve website performance by:

  • Instant help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • A global audience reaches data centers around the world.
  • Use our built-in application performance monitor for optimization.

Buy WordPress Hosting at Best Prices!