fix image attachment issue