Hello.
In the CWP: "PHP settings" -> "PHP version switcher" , "Select PHP version" -> "Next"
in the list "Additional configuration (only for advanced users):" check "--with-jpeg-dir=SOMEPATH" and try to found jpeg in the SOMEPATH .
Probably you have to change the path to other