-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images with media_folder prop do not appear on the cms #5525
Comments
Hi @cyono, per the docs, field level - {
name: missionHero,
label: Mission and Core Ideology Hero Image,
widget: image,
media_folder: '/{{media_folder}}/other-images',
public_folder: '/{{public_folder}}/media',
} Can you try that? |
Thank you for the insight @erezrokah! Sadly, passing the media and public folder doesn't seem to have an impact on the cms media pop-up. Since I am using a relative query in the first place the media_folder isn't as important to this problem, I don't think. Specifying public_folder specification doesn't seem to help either, though. When I remove the public_folder prop, all of the images are placed into I admit this problem could be caused by ignorance in my design. The project expects plenty of picture updates in the future, so I am trying to implement a design that enables those changes from the CMS while keeping build times low. My stack uses React hooks and |
Can you clarify what you mean by Please note that the global media folder (when you open it not from the editor widgets) doesn't list nested directories. With that said, can you describe the repo structure you would like to have and where images should be saved per entry/field? |
In short, I was trying to view nested directories in the global media folder. Everything in the issue was an attempt to get that result, so if that isn't possible this issue becomes more of a feature request than anything. If that's not a feasible feature request, then I need to rewrite how my website handles images. Re: "admin panel", I was calling the CMS the admin panel because that's the way my client refers to it, sorry for the confusion. |
Thanks for clarifying, we have an ongoing PR #4670 for showing nested directories in the media folder. I still need to follow up on it as it's missing support for other backends (only supports GitHub) and also CI is failing for it. |
I have split my images into folders using the media_folder property on any image widget in the config.yml, for example:
The markdown file for the above widget contains this line:
This has been greatly beneficial to the project. However, when trying to change the image from the admin panel, no assets are found. The images are successfully queried and rendered on deploys.
Any new assets added through the admin panel are placed in my public folder,
/uploads
. This then breaks the site, since the graphql queries for the images are searching for the relativeDirectory identical to the config.yml widget's media_folder prop.Is this a bug, intentional, or a work in progress?
To Reproduce
Uncaught TypeError: o.image1 is undefined
Expected behavior
I expect to be able to see the media under my public folder's subfolders and to modify that media from the admin panel.
Screenshots
Applicable Versions:
CMS configuration
https://pastebin.com/Ar8keWVL
Expand configuration
The text was updated successfully, but these errors were encountered: