With Photon enabled, post-thumbnail disappears on blog index page
-
I created some custom thumnail sizes in my functions.php using the following:
/* Enable featured image */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 650, 300, true ); if ( function_exists( 'add_image_size' ) ) { add_image_size( 'sidebar-thumb', 300, 150, true ); add_image_size( 'small-thumb', 125, 125, true ); add_image_size( 'home-thumb', 300, 182, true ); }
I then call the thumbnail on the blog index page using the following:
<?php $id = get_post_thumbnail_id(); $image_attributes = wp_get_attachment_image_src( $id ); // returns an array if ( has_post_thumbnail() ) { if ($image_attributes[1] > 649) { the_post_thumbnail(); } } ?>
It works fine, but as soon as I enable Photon, the images disappear. When I disable it, they come back. Any ideas how I can fix this?
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘With Photon enabled, post-thumbnail disappears on blog index page’ is closed to new replies.