Preload the image before showing the dialog
This prevents the dialog from resizing while it's visible