diff --git a/packages/core/src/tool/plugin/image-generate.ts b/packages/core/src/tool/plugin/image-generate.ts index 79c689595df..cba00ffa856 100644 --- a/packages/core/src/tool/plugin/image-generate.ts +++ b/packages/core/src/tool/plugin/image-generate.ts @@ -162,7 +162,7 @@ export const Plugin = { // Downloads follow the same rule as the webfetch tool, so denying web access also covers image URLs. yield* permission.assert({ action: "webfetch", - resources: [URL.parse(source)?.href ?? source], + resources: [URL.parse(source.split("#")[0])?.href ?? source], save: ["*"], metadata: { url: source }, ...Permission.invocation(context),