fix image element to work

Fix #301