fix image location detection for export_sm_images