Fix: Set img src before opening custom dialog