Index: src/modules/contrib/pathologic/pathologic.module
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pathologic/pathologic.module	(revision beb8b9a5be1a9c2da02497cf2af1b097e577ccd3)
+++ pathologic/pathologic.module	(revision )
@@ -357,8 +357,12 @@
   if ($parts['path'] == '<front>') {
     $url = Url::fromRoute('<front>', [], $url_params['options'])->toString();
   }
+  // add language prefix if language object is set (otherwise it may be that e.g. images get the path /sites/sites/default/...
+  else if (isset($parts['language_obj']) && isset($prefix)) {
+    $url = Url::fromUri('base://' . $prefix . "/" . $url_params['path'], $url_params['options'])->toString();
+  }
   else {
