Files
convert-ui/components/converter
Sebastian Krüger edbb5d1388 debug: add comprehensive logging for image preview issue
Added detailed logging at every step of the image conversion and preview:

ImageMagick Service:
- Log input and output sizes
- Log applied quality settings
- Verify result is not empty before creating blob
- Log created blob size and MIME type
- Fail early if conversion produces empty result

Preview Component:
- Log blob details (size, type, URL)
- Add onError handler to img tag with detailed error info
- Add onLoad handler to confirm successful loading
- Console logs will help identify:
  - Is the blob empty?
  - Is the MIME type correct?
  - Is the object URL valid?
  - What error occurs when loading?

TypeScript Fix:
- Changed result type to `Uint8Array | undefined`
- Allows proper checking before blob creation

This will help diagnose why the preview image appears broken
despite successful conversion.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 12:16:37 +01:00
..