diff --git a/src/Cropper.Blazor/Client/Pages/BasicUsage/BasicCropperUsagePage.razor b/src/Cropper.Blazor/Client/Pages/BasicUsage/BasicCropperUsagePage.razor index 5ca86bad..8f54c225 100644 --- a/src/Cropper.Blazor/Client/Pages/BasicUsage/BasicCropperUsagePage.razor +++ b/src/Cropper.Blazor/Client/Pages/BasicUsage/BasicCropperUsagePage.razor @@ -75,5 +75,21 @@ + + + + A cross origin image with a crossorigin attribute and an available Access-Control-Allow-Origin response header can be cropped by Cropper.Blazor. + If you try to start cropper on a cross-origin image, please make sure that your browser supports + HTML5 CORS settings attributes, + and your image server supports the Access-Control-Allow-Origin option (see the HTTP access control (CORS)). +

+ If your image isn't be a cross-origin, set the CheckCrossOrigin in the Options property to false. +
+
+ + + +
+ diff --git a/src/Cropper.Blazor/Client/Pages/BasicUsage/Examples/LoadCrossOriginImageExample.razor b/src/Cropper.Blazor/Client/Pages/BasicUsage/Examples/LoadCrossOriginImageExample.razor new file mode 100644 index 00000000..0813ff22 --- /dev/null +++ b/src/Cropper.Blazor/Client/Pages/BasicUsage/Examples/LoadCrossOriginImageExample.razor @@ -0,0 +1,29 @@ +@using Cropper.Blazor.Models + +
+ +
+ + + +@code { + private Options options; + + public Dictionary InputAttributes { get; set; } = new Dictionary + { + { "crossorigin", "anonymous" } // Another possible values: "use-credentials" or "" (the same as "anonymous"). An invalid keyword and an empty string will be handled as the anonymous keyword. For more information see official https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin documentation + }; + + protected override void OnInitialized() + { + options = new Options + { + + }; + } +}