Fix errors in image plugin when removing htmlPreview from dialog definition

Add possibility to remove 'htmlPreview' uiElement from image plugin - fix errors.