Depending on what you are trying to do,
You could use dism to e.g. add language packs. If you remove anything with dism - it doesn't seem to get any smaller , so imagex export after the fact should do it.
Otherwise, do an installation., set it up how you like, sysprep it and capture with imagex.