use $image->getUrlGenerator()

@Wikia/platform-team 
https://wikia-inc.atlassian.net/browse/PLATFORM-634

Both `File` and  `GlobalFile` have a `getUrlGenerator` function, so let's use that to patch this fatal.