Thanks for your time.
Its not a issue with autooptimize.
The path to the uploads folder is pointing to my root wordpress installation.
I changed the path via functions.php to the folder where wordpress is installed “/blog”.
It is now working on desktop. But still old path is showing on Mobile.