LPS-49178 Support cover image in blog entries

What is the benefit to create this function as global, but to invoke it inside another function, created inside Liferay.provide?
Could you consider move it inside?