Images for collections? #3283
-
Hi everyone! Is there a simple way to add images to collections like you do with blocks? Or would you have to develop a plugin for that? I am not referring to the images field but to the imageURL option of the blocks. Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
matthijs166
Sep 8, 2023
Replies: 1 comment 2 replies
-
The way to go is to use the relationship field (Documentation) My recommendation is to look and try the public demo. There is an example there on how to reference the media collection: |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
zubricks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The way to go is to use the relationship field (Documentation)
My recommendation is to look and try the public demo. There is an example there on how to reference the media collection:
(https://github.com/payloadcms/public-demo/blob/master/src/blocks/Media.ts)