Error thrown

Call to a member function image_output() on null