use object and preview as resource types