1

I have an image field for my article content type with the machine name field_image

I created a new type of content for cooking recipes. Should I use the existing image control or create an image control with a new machine name?

I don't understand the difference.

Why put a different machine name for a field of the same type?

2
2

Content types can have different categorization of images. For example, one content type may have a field image that is an image to represent that node. Another content type, say for a song, may have an image for 'album cover'. These are both image types, but other than that there isn't any relation between the data contained. So it wouldn't make sense to re-use the machine name in this case. However, if your other content type also is using an image to represent the node, then you could re-use the field.

[Edit - adding Leymannx's link that explains in much better detail] https://www.ostraining.com/blog/drupal/re-using-drupal-fields/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.