Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Could you let know how the Featured Image is inserted into your theme? If you could paste the function inserting that image here, that could help us in figuring out why it isn’t resized properly.

    Thanks!

    Thread Starter arslion

    (@arslion)

    <?php if( has_post_thumbnail() ): ?>
    
    	<?php $post_thumbnail_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), $thumbnail_size ); ?>
    	<?php $post_thumbnail_data = ss_framework_get_the_post_thumbnail_data( $post->ID ); ?>
    
    	<a>" title="<?php echo $post_thumbnail_data['title']; ?>" <?php echo $lightbox; ?>>
    		<img src="<?php echo $post_thumbnail_img[0]; ?>" alt="<?php echo $post_thumbnail_data['alt']; ?>" title="<?php echo $post_thumbnail_data['title']; ?>" class="entry-image <?php echo $post_thumbnail_data['class']; ?>">
    	</a>
    
    <?php endif; ?>

    [Please post code or markup snippets between backticks or use the code button. As it stands, your posted code has been permanently damaged by the forum’s parser.]

    This code?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Thank you!

    We’ll have a look at it, and get back to you as soon as we can address the issue.

    Plugin Contributor Erick Hitter

    (@ethitter)

    Thanks for the code snippet!

    The first thing I noticed is that $thumbnail_size isn’t defined in the sample you provided. Can you confirm that the variable is defined and provide its value when Photon isn’t resizing as expected? If you’ve registered a custom image size for $thumbnail_size, can you provide the add_image_size() definition you’re using?

    Based on the URL of the incorrect image, the height seems to be missing in the request to Photon, causing Photon to return the original image without modification. The information I requested should help diagnose why the height isn’t being parsed.

    Also, is there any reason why you aren’t using the_post_thumbnail() to retrieve the image? It shouldn’t change the behaviour, but it is a simpler way to display the post’s featured image.

    Thread Starter arslion

    (@arslion)

    $thumbnail_size is already defined. Everything works fine on my own server. When i use Photon it won’t resize. Don’t know why..

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Would you mind testing the development version of Jetpack, available here:
    http://downloads.wordpress.org/plugin/jetpack.zip

    We’ve made a change to the Photon module (see r656361) that could solve your issue.

    Thread Starter arslion

    (@arslion)

    Tried . didn’t worked 🙁

    I have a similar problem. I have defined image sizes in Settings/Media, but when I turn photon on, the images are not sized based on the settings/media size but revert to the original upload ratio.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Featured image is not resizing :/’ is closed to new replies.