Drupal 7 如何将图像字段添加到自定义内容类型?

Drupal 7 如何将图像字段添加到自定义内容类型?,drupal-7,Drupal 7,我是Drupal新手,我试图通过编程创建自定义内容类型。我使用了以下代码: $content_type = node_type_set_defaults($slideshow_images); node_add_body_field($content_type, $t('Body')); node_type_save($content_type); 实现内容类型的标题和正文。如何将图像字段添加到此字段

我是Drupal新手,我试图通过编程创建自定义内容类型。我使用了以下代码:

$content_type = node_type_set_defaults($slideshow_images);
node_add_body_field($content_type, $t('Body'));
node_type_save($content_type);
实现内容类型的标题和正文。如何将图像字段添加到此字段