You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the plugin bootstrap logic in wp-shortpixel.php calls wp_upload_dir() which determines the path of the uploads directory for the current month and attempts to create it whenever a new month rolls over.
This logic is triggered on every pageload of the site when the plugin file is loaded and will create new directories even for months when no new files were uploaded.
Consider switching to wp_get_upload_dir() which returns the same data but doesn’t do the file operation.
Alternatively, consider delaying the call to any of these functions (in bootstrap logic in general) until the data is actually needed for the first time (when rendering an image).
The text was updated successfully, but these errors were encountered:
During the plugin bootstrap logic in
wp-shortpixel.php
callswp_upload_dir()
which determines the path of the uploads directory for the current month and attempts to create it whenever a new month rolls over.shortpixel-image-optimiser/wp-shortpixel.php
Line 64 in 5fd9ac3
This logic is triggered on every pageload of the site when the plugin file is loaded and will create new directories even for months when no new files were uploaded.
Consider switching to
wp_get_upload_dir()
which returns the same data but doesn’t do the file operation.Alternatively, consider delaying the call to any of these functions (in bootstrap logic in general) until the data is actually needed for the first time (when rendering an image).
The text was updated successfully, but these errors were encountered: