Call to undefined function App\Controller\imagejpeg()

I’m trying to create something to watermark the images I use on my blog.
For this, I have updated an older script that I used to use (just some small clean-ups, nothing major).
With “plain” PHP (without CakePHP), this script works like it should, however, in CakePHP I get Call to undefined function App\Controller\imagejpeg().
imagejpeg() is part of php-gd which I have installed.

Any way of fixing this?

Do you call $this->imagejpeg() instead of imagejpeg()? Hard to tell without code.

No, it’s literally just imagejpeg();

// Send the final image to the browser as jpeg
header('Content-type: image/jpeg');

// Clean up just for the sake off

Apparently, I installed php-gd without support for jpeg :frowning: