-
AuthorPosts
-
March 12, 2022 at 2:21 am #1344182
Good morning
I am currently creating a website which will have over 20,000 images. Having uploaded about half the images, I realised they were quickly taking up a lot of disk space. So I installed ShortPixel and that has reduced the size of the images. The client’s hosting account has 5GB of data and I am pretty sure I will run out of disk space, even with the compression.So I am wondering how can I remove the images, which the website isn’t using. 95% of images are in a photo gallery setting, so I am wondering which images can be deleted – please see link to a couple of pages below.
I saw some threads which discussed placing code in the functions.php file, but they were from 2019 so I am unsure whether that still applies. Plus I am not sure what I would need to change in the examples given in the thread, so that it applies to my client’s website and then adding it to functions.php in case I mess it up.
Thank you very much for your help.
March 12, 2022 at 2:27 pm #1344218Hey Ivana,
I would recommend using the plugin Simple Image Sizes and placing a zero in sizes that you don’t need, including the basic WordPress sizes.
While you could make a function from the thumbnail sizes in functions.php starting at line 211 for your child theme, using this plugin is easier, don’t worry about the age of the plugin, it is very basic and reliable.
Please note that typically you would use the regenerate thumbnails option to correct the existing thumbnails, but in your case you want to “remove” them so I don’t know if the plugin will remove them, you may need to delete them via FTP, but future image uploads will not create thumbnails for the ones you make zero.Best regards,
MikeMarch 16, 2022 at 6:43 am #1344667Many thanks for your help Mike. I’ll give the Simple Image Sizes plugin a go.
March 16, 2022 at 10:39 am #1344709 -
AuthorPosts
- You must be logged in to reply to this topic.