Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
None
Description
I'm trying to determin the URL of images outside of the context of a request. To be exact, we index our pages to elastic search.
This will often not happen directly triggered by a request, e.g. because it is running in the background.
Much availabe code which exist to find out heavly depends on a WebContext being available.
ImagingSupport#createLink will e.g. inevitably call MgnlContext.getContextPath() which will only give an exeption.
Besides it will in principle also give the wrong answer, because this code is running on the author mode, and it will of course need to create links to images on the public node, which might have a different contextPath.
Actually all code to determin 'public urls' is getting cumbersome, not only in imaging, so perhaps I'm missing something.