Hello David,
Thanks for these quesions! Let me answer them one by one:
Can you confirm that creating WebP versions of images does not generate new post IDs for each version? We want to be sure this won’t excessively increase the number of entries in our database.
David
Yes, I confirm this won’t happen!
How will creating WebP versions of all existing images impact the WordPress database, particularly the postmeta table? Is there a significant risk of increased query times or other performance issues?
David
Starting with version 5 of our plugin, the optimization data is out of the postmeta
table, exactly for these reasons! Therefore, all optimization data is stored in a custom table, called shortpixel_postmeta
. In conclusion, this will not lead to any impact to the existing queries done on the postmeta
table.
At the same time, please keep in mind that generating WebP files for a very large site will take time and will require server resources, especially for file operations, such as downloading the optimized files from our API, storing them in a temporary location, then replacing the originals with the optimized files, plus the WebP versions of them. We have a tutorial for such cases, where running the daily optimization can be fine-tuned with WP-CLI and some cron jobs.
How much additional disk space might be needed to store these WebP versions alongside the existing image formats?
David
This depends on the following factors:
- are the images already optimized? if not, then the disk space will be less, following the optimization. Then, the WebP files generally occupy around 50-60% of the optimized JPG images. If your uploads have say 200G, with WebPs you’re likely to reach 300G, maybe a bit less, maybe a bit more, without backups (see next point).
- will you store a backup of the original images (our plugin has this as a default setting, turned on)? This helps with various operations and we recommend keeping it at least until the whole bulk process is finished. You can then periodically remove the backups from the live server and store them somewhere else, in case you need to restore or re-optimize the images with other parameters (such as resizing, SmartCrop, etc.)
Please tell us if you have any other questions!