Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

refactor(knowledge): remove unnecessary URL resolution for image paths

wizardchencb504e35b859
diff --git a/internal/application/service/knowledge.go b/internal/application/service/knowledge.go
index 8e39fe828..1308746ef 100644
--- a/internal/application/service/knowledge.go
+++ b/internal/application/service/knowledge.go
@@ -7578,12 +7578,6 @@ func (s *knowledgeService) ProcessDocument(ctx context.Context, t *asynq.Task) e
// Step 2: Store images and update markdown references
var storedImages []docparser.StoredImage
- // For URL imports, resolve relative image paths to absolute URLs
- // so that ResolveRemoteImages can download them.
- if payload.URL != "" && convertResult != nil {
- convertResult.MarkdownContent = docparser.ResolveRelativeImageURLs(convertResult.MarkdownContent, payload.URL)
- }
-
if s.imageResolver != nil && convertResult != nil {
fileSvc := s.resolveFileService(ctx, kb)
tenantID, _ := ctx.Value(types.TenantIDContextKey).(uint64)