How to Bulk Resize Images in WordPress
Every time you upload an image to your WordPress website, WordPress automatically creates resized or rescaled duplicates of that image which fit the predefined image size. These are used as optimized versions of that image on various screen sizes. However, the original image never gets optimized, which can cause issues on the website. Specifically, every time a large, unoptimized image loads, it will slow down the website’s load time, leading to an increase in bounce rate and a general decrease of visitors.
Most WordPress users aware of this issue will try to optimize their images before uploading them to a WordPress website. For others, WordPress offers a way to resize the images within the Media Library, which can alleviate the problem slightly if used properly. However, since WordPress users can have hundreds or thousands of uploaded images, this solution is less practical. Instead, the best solution is to find a way to bulk resize large images in WordPress, which is precisely the topic of this article.
Without further ado, let us begin. Here is what we will be talking about:
Since image optimization is an important part of optimizing any WordPress website, there are many WordPress plugins, as well as other software, which allows you to resize large images. We will, however, only cover the plugin method in this article, as it is best suited for the vast majority of WordPress users. Specifically, we will showcase the Imsanity plugin.
The Imsanity plugin allows you to set the maximum sizes in which images on your website can be uploaded and used. Meaning, any uploaded images which exceed these dimensions will automatically be scaled down to specified values. Furthermore, the plugin can resize existing website images, either one at a time or all at once using the bulk resize feature.
You can also exclude some images from the bulk resizing process by appending the suffix “-noresize” to their filename. Furthermore, the plugin also allows you to convert uploaded .bmp and .png images to .jpg and specify the image quality of the resized images.
All in all, it is a simple plugin for WordPress users who have a lot of images that they aren’t comfortable with manually resizing or rescaling. Furthermore, since the plugin uses default WordPress rescaling functions, we must mention that some image quality loss is unavoidable. This, in turn, makes this plugin more suited for blogs and websites which don’t require high-resolution images.
After installing and activating the plugin, navigate to the Settings > Imsanity section. There, you will see all the settings that the plugin has to offer. You will be able to set the maximum width and height for images uploaded within a page or post, Media Library, or elsewhere. Additionally, you can set the image quality for resized .jpg images, convert .bmp or .png images to .jpg ones, and delete the originals.
These settings will apply for newly uploaded images, while the dimensions and image quality settings will apply for the image resizing feature that the plugin applies to all images. Finally, if you want to convert existing images to .jpg ones, the plugin authors advise using one of their other plugins in conjunction with this one. However, as this is not the topic of our article, we won’t discuss it any further.
For this article, we have kept most of these settings at their default values, but you can adjust them as you see fit. Having done that, press the “Save Changes” button to apply the settings.
Afterward, proceed to the Bulk Resize Images section. As it is an irreversible process, it is important to carefully read all the warnings and notifications that are written. For most WordPress users, these two are the most important – making a backup of your images and the fact that you can resize a single image to test the resize functionality. As for the former, you can make a backup of the website, which we strongly advise making at this point. Having done that, let us explain the latter.
To test the resize functionality, navigate to the Media > Library section and select the List view. Then, in the following list of images, note the Imsanity column which has appeared. In it, you will be able to see the original image dimensions and resize the larger ones. Specifically, images which have at least one of the dimensions higher than you previously specified will have a “Resize Image” button next to them. To resize any image, i.e. rescale it to fit the conditions that you have set previously, press the “Resize Image” button.
Shortly thereafter, you will see a status message stating that the image was resized and to which dimensions. Then, after refreshing the page, only the new dimensions will appear within the same column.
Inspect the newly created image, both in the Media Library and any posts or pages it is displayed on. If you are unsatisfied with the outcome, you can simply disable the plugin and re-upload the image in its original dimensions. Conversely, if you are satisfied with the outcome, you can choose between resizing individual images or bulk resizing.
In the rest of our article, we will talk about the bulk resizing feature. Since it is enabled quite easily, the most important part is to exclude any images on which you don’t want to resize. The images can be both the ones that are already present on the website, as well as ones that you plan on uploading in the future. To exclude images from the resizing process, you only need to add the suffix “-noresize” to the name of the image file. For example, if you don’t want to resize the image “photo.jpg”, rename it to “photo-noresize.jpg”.
After properly excluding all the images you don’t want to resize, navigate back to the Settings > Imsanity and locate the Bulk Resize Images section once more. If you are certain you want to bulk resize all images to the image dimensions you have previously set, press the “Start Resizing All Images” button.
You will be prompted to confirm your choice and start the bulk resizing process. If you have previously created a backup of your website, press the “OK” button.
Having done that, you will see a new section at the bottom of the page, in which you can monitor the status of the resizing process. You can pause the resizing process by pressing the “Stop Resizing” button and resume it at a later time from the same section. You will see one of two possible status messages as you monitor – OK, shown when the images are successfully resized and SKIPPED if the image doesn’t require any resizing.
Needless to say, you will have to wait until all images have been processed, which can take a while, depending on the number of images you have on the website. Once the process is done, you will see a status message stating that the resizing has been completed.
However, we still advise reviewing your pages and posts afterward to verify that the resized images are displayed properly. Then you can decide if some images need to be resized further or reuploaded on a case-by-case basis.
Final Thoughts
Large, unoptimized images can pose a big hurdle for website speed optimization whenever they are used. Therefore, resizing them before they are uploaded to WordPress is preferable. Nevertheless, even if you or your contributors have uploaded unoptimized images, there is an easy way of resizing them using the Imsanity plugin, which we covered in this article.
As the plugin is quite simple to use, we are sure you will able to resize the large images on your website. And, as mentioned in the article, with proper website backup beforehand, you will ensure that no mishaps occur during this process. Finally, since the ability to resize large images in bulk is beneficial to most WordPress websites, we strongly suggest bookmarking this article for possible future uses.