Add pre-update resource listener

Fixed error when add an empty product image entity