Thread Starter
jbx
(@jbx)
Thanks. The reason was actually that the thumbnails I had were 120 by 80, resized slightly for Events Manager, I didn’t realise it was previously generating them using TimThumb.
Small suggestion, given this major change. You might want to consider adding a parameter to: #_EVENTIMAGEURL
(or even #_EVENTIMAGE
) so that we are able to specify which thumbnail we want to use, because we have different thumbnails for different areas, and the one used for the Event Manager widget is not necessarily the default one.
That way we can just generate the thumbnail through wordpress in functions.php
using an extra:
add_image_size('event-thumb', 110, 72, true);
And in the widget we just put something like:
<img src="#_EVENTIMAGEURL{event-thumb}" width="110" height="72" />
In my case we also use the Crop Thumbnails plugin so the author/editor actually crops each of the thumbnails correctly. It would be good to have a specific thumbnail for events manager widget in this way.
the thumbnail game has proven to be very tricky.
I like your suggestion though… will look into that.
However, I do think wiht WP Thumbnails Enabled (default settting) if you add that code to your functions.php file and then look for thumbnails like this:
#_EVENTIMAGE{110,72}
WordPress would automatically choose that image since it’s the most relevant size.
Thread Starter
jbx
(@jbx)
Yes now its working that way. My mistake was that my thumbnails were slightly larger (120 by 80, I use the same ones for a couple of other places), so #_EVENTIMAGE{110,72}
wasn’t picking up the 120 by 80 one, but the original one which could be anything the user uploads.
A slight issue I have is that #_EVENTIMAGE{120,80}
generates an <img>
tag that has width="120" height="80"
. I overrode them in CSS now to 110 by 72, but ideally I would have used #_EVENTIMAGEURL
instead, but I can’t specify the width and height with that then (to select the right thumbnail), it doesnt have the same options like #_EVENTIMAGE
.