I encoded a canvas-image to base64 which gives me this:
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAICAgICAQICAgICAgIDAwYEAwMDAwcFBQQGCAcICAgHCA
It works - seems when a file is included in php using
include('file.php');
the relative path is from the parent and not from the included file :(
That was the whole problem... Thanks to all