If I have a RTE field which content is used for example in an external JS file (respectively in a variable inside of that file), all image links have relative paths even when absRefPrefix is configured. For RTE fields which are used in normal page content this is no problem as TypoScriptFrontendController::setAbsRefPrefix() takes care of prefixng the links with the absRefPrefix. For my example this doesn't work as their content won't be parsed through TypoScriptFrontendController.
If TYPO3\CMS\Extbase\Service\ImageService::getImageUri() would be used instead of getPublicUrl to get the image URL in ImageRenderingController there would be no problem as the Image Service takes care of that. That's how it's done in the fluid Image ViewHelper for example, too.
If I have a RTE field which content is used for example in an external JS file (respectively in a variable inside of that file), all image links have relative paths even when absRefPrefix is configured. For RTE fields which are used in normal page content this is no problem as TypoScriptFrontendController::setAbsRefPrefix() takes care of prefixng the links with the absRefPrefix. For my example this doesn't work as their content won't be parsed through TypoScriptFrontendController.
If TYPO3\CMS\Extbase\Service\ImageService::getImageUri() would be used instead of getPublicUrl to get the image URL in ImageRenderingController there would be no problem as the Image Service takes care of that. That's how it's done in the fluid Image ViewHelper for example, too.