You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following is the content field inside a collection's schema. I am trying to enable images inside the Document.
content: fields.document({label: "Project Content",description:
"Makes up the individual project page. ONLY use Paragraphs, Heading 2s and Heading 3s. We do not support Quotes & Code (The last two icons in the bar.)",formatting: true,links: true,images: {directory: "/public/images/projects/individual/",publicPath: "/images/projects/individual/",schema: {alt: fields.text({label: "Image Alternate Text",description:
"This is read out to visually impaired users and displayed in a situation where the image was unable to load for any reason.",validation: {length: {min: 1},},}),title: fields.text({label: "Image Caption",description: "This is optional. Displayed under the image.",}),},},}),
According to the types, there is an images fields within the document config that allows you to specify a dir, pubDir & schema with title & alt. From the ts autocomplete, this is what I wrote but when I try to add an image is shows the following error.
Error: Invalid directory public/images/projects/individual in content field serialization
I know the Docs are still a Work in Progress, but could I get a head start on how this images field works and how I can set up the directories? As a secondary question, I already have an image field on this collection with the dir set to public/images/projects. To avoid any conflicts, I am using /projects/individual. Would love to know if that's a valid concern or if the way the image inside the document field is generated solves for this issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Following is the content field inside a collection's schema. I am trying to enable images inside the Document.
According to the types, there is an images fields within the document config that allows you to specify a dir, pubDir & schema with title & alt. From the ts autocomplete, this is what I wrote but when I try to add an image is shows the following error.
Error: Invalid directory public/images/projects/individual in content field serialization
I know the Docs are still a Work in Progress, but could I get a head start on how this images field works and how I can set up the directories? As a secondary question, I already have an image field on this collection with the dir set to public/images/projects. To avoid any conflicts, I am using /projects/individual. Would love to know if that's a valid concern or if the way the image inside the document field is generated solves for this issue.
Beta Was this translation helpful? Give feedback.
All reactions