How to resize an encrypted folder (disk image)?

Hi,
I'm new to Mac, so forgive my foolishness.

I just found out how to encrypt a folder in Mac OS X using Disk Utility, but I couldn't figure out how to set the size of the folder first so I won't run out of space after I put more and more files into the folder. :huh:

Anybody know how to do this the right way?

PS: is this the right thread to post this question? Or should I post this at other thread since nobody is answering...
This somewhat dated blog has some info about using encrypted folder, maybe it can help or point you in the right direction...

Daily Tip: How to use encrypted disk images with Dropbox to Protect your sensitive files | iMore

Original thread: https://forums.imore.com/threads/how-to-resize-an-encrypted-folder-disk-image.343329/