Implement person image upload#2
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
processing-foundation-website | 1234701 | Commit Preview URL Branch Preview URL |
Jul 10 2026, 04:26 PM |
runemadsen
left a comment
There was a problem hiding this comment.
Very nice! I love the folder structure. Makes it a lot easier.
Just one comment and one question:
Comment: I think it would be great to implement an Astro component that renders an image with srcset and sizes as a part of this PR. I just see a standard img tag, so it's hard to check that the image resizing is actually happening.
Question: There is a 'Media' tab in the CMS that says that there is now media. Should the person image show up there, or how does it integrate with that functionality?
|
Regarding the comment: Added to the temporal example page the The question: The media tab will only show up media present on the common media folder ( |
Closes #1
This PR includes two things:
Added an option to run a local proxy server for development work + updated the docs to include it. With this, we can run this proxy server and build new features without commiting any intermediate/test content to Github via the admin panel, since all the content is only stored locally and can be ignored before pushing if necessary. If the server proxy is not on, the app automatically stores the changes on Github (the original behavior).
Added an image field for a person, which can later be rendered on astro using Astro's
component which include responsive configurations.For this, i had to modify the way each person is stored, so instead of having a
name.mdfile on/peopleand asrc/assets/media/people/subfolder with the image file inside, it has aperson-namesubfolder inside/people, that contains aindex.mdfile with the content and the image (like therune-madsenexample, though that one doesn't have an image yet).You can try it out by making a new Person on the admin panel and including a photo for them. I also added the temporary
/people-testroute to test the rendering of the images on Astro.I did this because if we went with the
src/assets/media/people/single folder for all images, we cannot have two different image files with the same name, even if it's for two different people (in the admin panel, it prompted the user to confirm whether they wanted to replace the original image with the new one). Also this way it's easier to know which image is linked to which user. If we still want to go with the other option (singlesrc/assets/media/people/folder and users have to manually make sure there are not duplicate names in files), we can go with that option instead.