Unlock an encrypted DMG on login
Add the disk image to System Preferences→Users &amp; Groups→Login Items.
Put the password in your keychain.
Accept that you've just thrown away part of the value of encrypting the disk image.

There is some remaining value. An intruder can't open the disk image with only your disk or the disk image or a copy thereof to work with. But they can open it if they can get control of your computer while you're logged in.

At the least, disable automatic login, and enable "requires password to wake from sleep or screen saver".