Forum
images will not show on the page
Hello
I have installed perch and when I upload an image it appears in the Assets but will not appear in the dashboard. I am using repeated regions as it is a profiles page. The text displays alright even when I save the work The image dose not appear.
I am using the following .html template:
<perch:repeater id="marvellous_profiles" label="Marvellous Profile" max="15">
<table width="961" border="0" cellspacing="0" cellpadding="0">
<perch:before><tr></perch:before>
<td><span class="C-5"><strong><perch:content type="text" id="Name" label="Full Name" /></strong></span></td>
<td width="245" rowspan="3" valign="top"><perch:content type="image" id="image" label="Image" crop="true" width="245" height="330"/></td>
</tr>
<tr>
<td><span class="C-5"><strong><perch:content type="text" id="qualification" label="Qualification" /></strong></span></td>
</tr>
<tr>
<td style="padding-right:10px;"><p class="C-13"><perch:content type="textarea" id="biography" label="Biography" /></p></td>
<perch:after></tr></perch:after>
</table>
</perch:repeater>
Can you help please.
Where in the dashboard are you expecting to see the image?
Where is says Select or upload upload an image. It is between name and Qualification
Paul
Hi I have reinstalled the perch files from fresh.
It seems to be adding the image in the correct section in the admin now. I save the new entered details, but on the page perch has added "-w245h330.jpg to the image file. I think that is why the image is not showing. Can you throw any light as to why it added this?
Thanks
We add a suffix to the file name when it's resized. That file is the version resized to fit
width="245" height="330"
.If we didn't rename the file, you'd only ever be able to have one size of image.
Hello
That is very interesting but why is the image not appearing on the page rendered by Perch?
You haven't given us enough information to say. What else can you tell us about this?
Paul. The image isn't showing because there isn't a complete image tag. Add this...
And you'll be fine.
Sorry working on iPhone in forum makes it tough to give complete example
Robert Ketter
Hello Robert
I have changed the image tag to:
but I am still getting displayed on the live page: https://www.marvellousminds.co.uk/profiles2.php
/marvelbev/resources/beverlymorris-w245h330.jpg
What are you expecting to be output? Please give example of expected html.
Hello Robert
I was hoping to reproduce the section shown below which is on the page using plain HTML. I had put the <img src " .....
round the wrong section of htlm in the template. The code on the template is now:
I am hoping to enable multiple profiles as seen on the page.
The out put I was hoping to create was a tabled HTML like the code below:
If you want an image you need to use a perch image tag.
It will, as Robert has explained, output the path to the image. If you want to output an image tag, do that in your HTML as normal.
This is all detailed in the documentation:
https://docs.grabaperch.com/docs/templates/attributes/type/image/
Paul, This part of your code is working perfectly for me...
it produced this output for me...
Is this not working for you?
Hello Robert
It is outputting it correctly now.
Many Thanks,
Paul
Awesome, Your welcome. Glad to be able to sort it out. :)