display = 'block';
        updateDisplayedImage();
        updatePreviewHint();
        
        imgDataUri.value = `<img src="${optimizedSrc}" alt="Optimized Image" />`;
        
        // Calculate and display sizes
        const originalSize = Math.round(originalSrc.length * 3 / 4);
        const optimizedSize = Math.round(optimizedSrc.length * 3 / 4);
        const savings = Math.round((1 - optimizedSize / originalSize) * 100);
        
        jpegSize.textContent = `Optimized: ${optimizedSize.toLocal