mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
Update image editing to use original image dimensions
Modify the image editor to load the original image source instead of a preview URL, ensuring accurate dimensions are used for edits and overlays. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/Hpj2VzR
This commit is contained in:
1 parent
0d4d847421
commit
ffffa18244
3 files changed
+3
-2
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 115 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
@@ -100,10 +100,11 @@ export default function ImageEditor() {
|
||||
throw new Error("Aucune image sélectionnée");
|
||||
}
|
||||
|
||||
// Load the image to get its natural dimensions
|
||||
// IMPORTANT: Always load the ORIGINAL image to preserve exact dimensions
|
||||
// Do NOT use previewUrl as it may have filters that change dimensions
|
||||
const img = new Image();
|
||||
img.crossOrigin = 'anonymous';
|
||||
img.src = previewUrl || selectedMedia.originalUrl;
|
||||
img.src = selectedMedia.originalUrl;
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
img.onload = resolve;
|
||||
|
||||
Reference in new issue
Block a user