Skip to content

Instantly share code, notes, and snippets.

@GeoffEW
Created January 22, 2019 16:10
Show Gist options
  • Save GeoffEW/1afff7e08a86bcbbd87ea77f21899eb4 to your computer and use it in GitHub Desktop.
Save GeoffEW/1afff7e08a86bcbbd87ea77f21899eb4 to your computer and use it in GitHub Desktop.
Fix for blurry images in the Photo view
<?php
// Fix blurry photo image #jrfm
// To use in functions.php without the PHP opening tag at the top :-)
function tribe_adjust_photo_view_image_size($unfiltered) {
if ( tribe_is_photo() ) {
$filtered = get_the_post_thumbnail( get_the_ID(), 'full' );
return $filtered;
} else {
return $unfiltered;
}
}
add_filter( 'tribe_event_featured_image', 'tribe_adjust_photo_view_image_size' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment