Skip to main content

Caching thumbnails generated by TimThumb

This technique no longer applies. Events Manager stopped using the TimThumb script in version 5.5.4, and version 7.5 contains no TimThumb code, so there is nothing to configure for it in a caching plugin or CDN.

What Events Manager does for images now​

Event and location images are WordPress featured images, stored in the Media Library like any other upload.

When a format asks for a sized image, for example #_EVENTIMAGE{300,200}, Events Manager calls WordPress's own get_the_post_thumbnail() with that size. WordPress serves the closest image size it has already generated, as a normal static file in wp-content/uploads. Static files are cached by browsers, page caches and CDNs without any special rules.

If you would prefer the full-size image scaled by HTML width and height attributes instead, set Disable WordPress Thumbnails? to Yes under Thumbnails in Events then Settings then General then Performance Optimization (Advanced).

If your thumbnails look wrong after moving away from TimThumb​

WordPress only creates image sizes at upload time. Images uploaded before your theme or settings defined a size don't have that size on disk, so a larger file is used and scaled down by the browser. Regenerate the sizes with WP-CLI:

wp media regenerate --only-missing