Fatal Error in autoptimizeImages.php on PHP 8.3
-
Hi,
I’m experiencing a recurring PHP fatal error on multiple WordPress sites running Autoptimize with PHP 8.3. The error appears in the server error log during high crawler traffic (typically at night) and results in HTTP 500 responses.
Error message:
PHP Fatal error: Uncaught Error: Using $this when not in object context in autoptimize/classes/autoptimizeImages.php on line 1061 #0 autoptimizeImages.php(912): autoptimizeImages::create_img_preload_tag() #1 autoptimizeImages->filter_lazyload_images()Environment:
- PHP 8.3
- WordPress (latest)
- Autoptimize (latest)
- Hosting: LiteSpeed server
Observations:
- The error occurs in the image optimization / lazy load functionality
- It does not occur consistently – it seems triggered by concurrent requests
- Temporarily disabling and re-enabling the image optimization feature does not resolve the issue permanently
- The error affects multiple sites with the same setup
Has anyone else encountered this? Is there a known fix or workaround short of permanently disabling image optimization?
Thanks
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.