Skip to content

Commit 97b3023

Browse files
authored
make sure only to prepend relative URLs (#18998)
1 parent ba0028c commit 97b3023

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper-field.element.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ export class UmbInputImageCropperFieldElement extends UmbLitElement {
7878

7979
get source(): string {
8080
if (this.src) {
81-
return `${this._serverUrl}${this.src}`;
81+
// Test that URL is relative:
82+
if (this.src.startsWith('/')) {
83+
return `${this._serverUrl}${this.src}`;
84+
} else {
85+
return this.src;
86+
}
8287
}
8388

8489
return this.fileDataUrl ?? '';

0 commit comments

Comments
 (0)