• Adam Capriola

    (@adamcapriola)


    Photon isn’t resizing my featured images.

    Before:

    https://i.imgur.com/xHjv1.png

    Image HTML:

    <img width="125" height="125" src="https://www.sixprizes.com/wp-content/uploads/2012/11/season3_ep6_ss3-pikachus-e1352426241464-125x125.jpg" class="attachment-125x125 wp-post-image" alt="season3_ep6_ss3 pikachus" title="Mastering Marathons">

    After:

    https://i.imgur.com/V6nyC.png

    Image HTML:

    <img src="https://i2.wp.com/www.sixprizes.com/wp-content/uploads/2012/11/season3_ep6_ss3-pikachus.jpg?fit=%2C" class="attachment-125x125 wp-post-image" alt="season3_ep6_ss3 pikachus" title="Mastering Marathons">

    Thumbnail generated with this:

    global $post;
    $size = array(125,125); // $size = array(100,100); in sidebars
    $attr = array( 'title' => get_the_title( $post->ID ) );
    get_the_post_thumbnail( $post->ID, $size, $attr );

    Any ideas why it’s not working? Photon seems incredible and I’d really like to use it!

    https://www.ads-software.com/extend/plugins/jetpack/

Viewing 15 replies - 16 through 30 (of 32 total)
  • Here is a link https://swanseawheelers.co.uk/social/
    The image was added through wordpress HTML editor using size 300 x 199 and the image appeared at that size until Photon is enabled. Then the image reverts to full width unless height & width attributes are aded manually.

    Yes, theme sets $content_width of 980

    Thanks

    Plugin Contributor designsimply

    (@designsimply)

    Thanks. I looked at https://swanseawheelers.co.uk/social/ and I see this HTML for the first image in the post while Photon is on:

    <img src="https://i0.wp.com/swanseawheelers.co.uk/wp-content/uploads/2012/10/wheelerssoc.jpg?resize=-300%2C0" alt="" title="Wheelers Social" class="alignleft size-medium wp-image-597">

    That resize value doesn’t look right.

    Could you please open the post for editing in your blog’s dashboard, copy the img HTML for that same image, and paste it in a reply here?

    This is straight out of the post:

    [ Code edited with backticks. Moderator note: when sharing code examples, please wrap the code in backticks or use the code button. ]

    <a href="https://swanseawheelers.co.uk/wp-content/uploads/2012/10/wheelerssoc.jpg"><img src="https://swanseawheelers.co.uk/wp-content/uploads/2012/10/wheelerssoc-300x199.jpg" alt="Wheelers Social" title="Wheelers Social" class="alignright size-medium wp-image-668" /></a>

    My query here is my does it resize thumbnail images that they get distorted.
    You could check this link https://cfci.org.in/category/cfci_difference/ and similarly all category links, the images are really coming bad!

    Can we have a solution like add noresize class or something in some places where I dont want to resize, and definitely how does small image resize into larger one’s?
    Wanted to fix this issue soon,coz we going live by next week so!

    Thread Starter Adam Capriola

    (@adamcapriola)

    @designsimply: I just updated to 2.0.4 but still have the cropping issue. It’s the same scenario as I described here.

    Is there any other information I could provide that would help?

    @everyone else: You might have better luck getting help if you start your own topics. Not to mini-mod, but I’d like to keep my topic on track until the bug is resolved.

    I have moved my query too here
    Sorry Adam for causing inconvenience to you ??

    Plugin Contributor designsimply

    (@designsimply)

    @mhk1058’s issue looks fixed (using Jetpack 2.0.4) at https://swanseawheelers.co.uk/social/ I noted seeing ?resize=-300%2C0 for the image before and now I see ?fit=300%2C300 now. I also see width and height attributes.

    <img src="https://i0.wp.com/swanseawheelers.co.uk/wp-content/uploads/2012/10/wheelerssoc.jpg?fit=300%2C300" alt="" title="Wheelers Social" class="alignleft size-medium wp-image-597" width="300" height="199">

    Screenshot: https://cl.ly/LhKa

    Aside: I wish we had a before screenshot for that one.

    Plugin Contributor designsimply

    (@designsimply)

    Adam, I’m starting to think that Photon might be working as expected in your case. But let’s go over the details one more time.

    I’m looking at this post:
    https://www.sixprizes.com/2012/11/21/the-marvelous-misadventures-of-empoleon-accelgor-at-santiago-regionals/

    For the 2nd image, I see this HTML:
    <img class="alignright size-medium wp-image-38047" src="https://www.sixprizes.com/wp-content/uploads/2012/11/800px-Dawn_Piplup-e1353520156848-225x225.png" alt="" width="225" height="225">

    Screenshot: https://cl.ly/LhUq

    Could you copy the Photon-version of that img tag one more time with Jetpack 2.0.4 enabled so we can compare it to the example you posted previously? Also, would it be possible for you to get the same example HTML snippets for an image in a new post created after you updated to Jetpack 2.0.4 to rule out a caching issue for your past examples?

    Yes, thanks, all working fine now with 2.0.4

    Thank you very much

    Thread Starter Adam Capriola

    (@adamcapriola)

    @designsimply: My issue is with post thumbnails, not in-post images. Images within post content are all fine. But here’s the HTML for that image with Photon on:

    <img class="alignright size-medium wp-image-38047" src="https://i2.wp.com/www.sixprizes.com/wp-content/uploads/2012/11/800px-Dawn_Piplup-e1353520156848-225x225.png?resize=225%2C225" alt="" data-recalc-dims="1">

    Screenshot: https://i.imgur.com/3w6Cx.png

    What I’m going to do is save the HTML of the homepage with and without Photon activated. Maybe that will help.

    Files: https://adamcap.com/wp-content/uploads/2012/12/photon-testing.zip

    Again, the thumbnails are generated in my templates with this:

    global $post;
    $size = array(125,125); // $size = array(100,100); in sidebars
    $attr = array( 'title' => get_the_title( $post->ID ) );
    get_the_post_thumbnail( $post->ID, $size, $attr );

    And only the Thumbnail images sizes are cropped. Other sizes are left alone. (I select crop Thumbnail when cropping.) If I do crop All Sizes though, the crop does show correctly on the home page.

    @designsimply Could you also look into this issue here: https://www.ads-software.com/support/topic/photon-enlarging-thumbnail-images?replies=1
    Sorry @adam, but my issue has not got any response from 3 days ??

    Newbie here, but I got same problem with photon on certain images, and I found that those with images with filename like image123-250×200.jpg won’t get displayed.

    Deleting these images and re-uploading to content won’t work. Try re-naming these images ex. image123.jpg, re-upload to post and it worked. Oh well…

    I am having a problem with Photon and image resizing.
    Photon is not serving the resized images based on my <img> widht and heigh.

    These are some details about how it is working:
    If I use $content_width = 600 in my “functions.php” the images are served resized at 600px (ok). If I remove $content_width the images are served at the original image size (which is 900px for me).
    But the problem I would like that Photon serve the image resized based on <img> width and height if they exist, but it is not happening.

    Do you know if that is a bug or if I need to do something to get that working? Thank you.

    I have another question, would it be possible to Photon serve resized images depending on the content width like Hammy does?

    https://www.ads-software.com/support/plugin/hammy

Viewing 15 replies - 16 through 30 (of 32 total)
  • The topic ‘Photon Not Resizing Featured Image/Post Thumbnail’ is closed to new replies.