Forum
Images in the Members App
Hi there,
Just wondering whether you can use images for the members in the members app?
I've added a simple image field to the member.html template it adds the field in Perch but when you save the image it disappears.
And when you call it with
echo perch_member_get('image');
It just outputs nothing, maybe I'm trying something that's not possible?
I'm all up to date.
What does debug output for the page?
Here it is on the page
Here it is after pressing save on the member and adding an image that disappears after saving
Ok, i did the force update (even though this was a fresh install) because i saw the perch2_resource_log table was missing in debug.
I now get this on the page
and now when i try to echo the image it outputs array
What does this return?
Ok, so:
Great that works for member.html, but not if the member adds the image themselves.
This is the debug after the member uploading the image
What do you get if they add it themselves?
Nothing at all
An empty string, or null, or an empty array, or something else?
Well null, if i remove everything from the page except the call for the image i get nothing.
An empty set of body tags, as if the id does not exist.
The image doesn't even get uploaded to the resources folder
Ah, ok, so that's a different issue. How are you handling the image upload?
I have this in the profile.html template
Ok, so you're not doing anything to actually process the image?
What do you mean by that? I assumed Perch would process the image itself?
There's nothing in the Docs to say i need to do more https://docs.grabaperch.com/docs/form/template-tags/input/image/
Any news on this?
Those are the docs for forms, not for the Members app. I'm not sure it has anything built in to process images. I'll log it as an enhancement request.
I see, thanks Drew.