Home › Forums › Calendar Products › Events Calendar PRO › Event Featured Images – Cropping and Sizing
- This topic has 5 replies, 2 voices, and was last updated 12 years, 2 months ago by
Julie Kuehl.
-
AuthorPosts
-
February 2, 2014 at 5:03 pm #99802
Paul
ParticipantI’m trying to figure out how the ‘featured image’ for an event gets sized and cropped. The site I’m working on seems to use the 300×300 version of an uploaded image, which is fine except that if the uploaded original image is not square it will squash it into a square. You can see the results here http://whanganuinz.com/events/upcoming/
Anyone got any ideas? Turning cropping on and off in the WP/Settings/Media does not resolve it. Ideally I would like the List view to use the 150×150 image, but I can’t see anywhere to set that – the Photo view is fine at 300×300.
Thanks
February 2, 2014 at 7:11 pm #99817Paul
ParticipantOK, I figured out that WP creates the squashed 300×300 image as it is uploaded. And I learned that with a bit of extra code I can get WP to create other size images and to crop them on upload as well. So I guess I need to know whereabouts Event Calendar Pro is told to use a particular image on the event List and Photo views and on the single listing itself. Thanks.
February 3, 2014 at 6:35 pm #100317Julie Kuehl
ParticipantHi wanganuiedc,
Before we dig too deeply here, have you heard of the plugin Regenerate Thumbnails? http://wordpress.org/plugins/regenerate-thumbnails/ If you’re trying to change the size of the thumbnail images, installing and running that plugin can preempt a lot of fancy footwork elsewhere.
Could you take a look at that and give it a try? And let me know if it helped your situation.
— Julie
February 3, 2014 at 7:47 pm #100336Paul
ParticipantHi Julie
I did that and yes, it made the thumbnail look better in the media library. But ECP is not using the thumbnail image in the events I create – it’s using the 300×300 image which WP generates. Where is it told to use that 300×300 image?
The issue we have is that we have dozens and dozens of Organisers so we need an idiot-proof method of them uploading images for their events without them (or us!) having to go anywhere near the WP admin. Does that make sense? If it does, do you have a solution? Am I barking up the wrong tree?
Thanks
Simon
February 4, 2014 at 12:53 pm #100654Paul
ParticipantOK, I did some more research and found a snippet of code which I added to functions.php in the theme to force WP to crop the “medium” (default 300×300 in our case) size image when an image is uploaded. This certainly works and a cropped, un-squashed image now appears both in the media library and on an Event listing.
Could you confirm or otherwise that this is the correct approach for creating the images required for your plugin when our Organisers create an event with an image?
Thanks
Simon
February 4, 2014 at 3:16 pm #100763Julie Kuehl
ParticipantHi Simon,
While I’m not 100% certain of what you’ve done with the code, your approach sounds solid. If it’s cropped on upload and defined as “medium” it should work for the event listing going forward. Of course, I’d encourage you to test it thoroughly. Maybe recruit one of your organizers to give it a go perhaps and can see if everything is as it should be.
— Julie
-
AuthorPosts
- The topic ‘Event Featured Images – Cropping and Sizing’ is closed to new replies.
