Forum
Adding images to Events
I am using the Events app and would like to be able to add an image for each event. In the event.html I am adding my own additional field to achieve this and the guide states I need to use perch:event instead of perch:content.
With perch:content I can set the size of the image and it will create a new size of image for this asset. However i cannot use perch:content in Events (will not show on content input page).
If I use perch:events I cannot automatically resize the image from assets - width and height and crop parameters appear to be ignored. This suggests that to add an image to an Event the user will need to resize the image first and upload.
Is this correct or am I missing something?
You're missing something. The field type is the same whether it's within a
perch:content
orperch:events
template.If you show us your code we might be able to suggest something.
Thanks Drew
Ok, that looks fine. How is it behaving, and how is that different from what you'd expect?
Image goes in - selected from assets not uploaded - and I would expect it to be resized to 218 px square. But when checking the output I am getting a full sized image (2000px square). My expectation is that selecting a larger image will create a new image resized and added to my resources folder.
Wait - now it's doing it. Two hours I just spent trouble shooting this and all it needed was me to make myself look stupid in front of Drew (easily done)!
I will go back over what i have been changing and check - page code is exactly the same but I have been deleting Asset buckets off this site.
Thank you Drew.