I've not tested but don't you need to use smth like OCP\image_path instead of this complex path?
(or at least smth more  generic if the apps dir is not named "apps")