Skip to content

High performance self-hosted photo and video management solution.

fix(web): properly project profile picture (#16095)

Mangat Singh Toor | ਮੰਗਤ ਸਿੰਘ ਤੂਰb1f05fc18bbf
diff --git a/web/src/lib/components/shared-components/profile-image-cropper.svelte b/web/src/lib/components/shared-components/profile-image-cropper.svelte
index b8ac866761..487a6470a8 100644
--- a/web/src/lib/components/shared-components/profile-image-cropper.svelte
+++ b/web/src/lib/components/shared-components/profile-image-cropper.svelte
@@ -58,7 +58,13 @@
}
try {
- const blob = await domtoimage.toBlob(imgElement);
+ const imgElementHeight = imgElement.offsetHeight;
+ const imgElementWidth = imgElement.offsetWidth;
+ const blob = await domtoimage.toBlob(imgElement, {
+ width: imgElementWidth,
+ height: imgElementHeight,
+ });
+
if (await hasTransparentPixels(blob)) {
notificationController.show({
type: NotificationType.Error,