• Resolved tewmgd

    (@tewmgd)


    I don’t know if it’s with the version 4.2.2 but today when I uploaded a picture and insert it as full size in my post I observed that the size served by photon was wrong (618px)

    Here’s the image element without photon:

    <img title="YUL-EWR-CDG06" class="size-full wp-image-10597" src="https://milesopedia.com/wp-content/uploads/2016/08/YUL-EWR-CDG06.jpg" alt="YUL-EWR-CDG06 Montréal - New-York sur Air Canada en classe affaires" width="1000" height="750" srcset="https://milesopedia.com/wp-content/uploads/2016/08/YUL-EWR-CDG06.jpg 1000w, https://milesopedia.com/wp-content/uploads/2016/08/YUL-EWR-CDG06-300x225.jpg 300w, https://milesopedia.com/wp-content/uploads/2016/08/YUL-EWR-CDG06-768x576.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px">

    and the same with photon activated :

    <img title="YUL-EWR-CDG06" class="size-full wp-image-10597" src="https://i0.wp.com/milesopedia.com/wp-content/uploads/2016/08/YUL-EWR-CDG06.jpg?resize=618%2C464" alt="YUL-EWR-CDG06 Montréal - New-York sur Air Canada en classe affaires" srcset="https://i0.wp.com/milesopedia.com/wp-content/uploads/2016/08/YUL-EWR-CDG06.jpg?w=1000 1000w, https://i0.wp.com/milesopedia.com/wp-content/uploads/2016/08/YUL-EWR-CDG06.jpg?resize=300%2C225 300w, https://i0.wp.com/milesopedia.com/wp-content/uploads/2016/08/YUL-EWR-CDG06.jpg?resize=768%2C576 768w" sizes="(max-width: 618px) 100vw, 618px" width="618" height="464">

    You can see the problem on this screenshot, the caption element is longer that the picture served by photon:

    https://s4.postimg.io/49qnyl2z1/photonpb.png

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

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

    (@jeherve)

    Jetpack Mechanic ??

    Could you check your theme’s functions.php, and make sure the $content_width value is correct there? It should match your theme’s available content width.

    If no value is defined, you can add it like so:
    https://codex.www.ads-software.com/Content_Width

    Let me know how it goes.

    Thread Starter tewmgd

    (@tewmgd)

    Thanks, indeed I changed the content width variable to the correct value and now the images size is correct. Weird since I never changed before and it was working.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    We’ve indeed changed the way Photon works in Jetpack 4.1; it is now set to serve images that match your theme’s content width. This way we’re sure to serve images that aren’t bigger and larger than they should be.

    Unfortunately, that will sometimes cause issues with older themes that do not define a $content_width value, as you’ve realized. We’re still working on this, and will continue to improve Photon and its image selection process in the future!

    What can I do when I have max. content_width and I want fullwidth image?
    Something like this, for example: https://demo.xfrontend.com/snowbird/mountain-winter-landscape-in-austria/

    Photon give me only content width image…

    Thanks for reply

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    @illycz Could you try the code snippet mentioned here, and let me know if it helps?

    Thanks for this,
    but this solution is still limiting.

    When I look on page from cinema display, 2000px is not enough ??

    If I set 99999999 there is problem within another jetpack functionality: https://github.com/Automattic/jetpack/issues/4175#issuecomment-227803890

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    @illycz How large are your original images? 99999999 is probably overkill, as I doubt any of your images are that large. You could set a value that matches the largest images on your site, that should solve the issue.

    We’re still trying to figure out a way to fix this for everyone though, so I’d recommend subscribing to that GitHub issue.

    Hi Jeremy,

    I don’t want to practice threadomancy this evening, but the topic title seems pretty right for my problem (btw I’ll open a new thread if needed)

    By installing and activating Jetpack, the visualization of some thumbnail on my site changes drastically: the images dimensione from 136x136px become 136x106px (or the same proportion, with smaller dimensions), so from a square/round shape they become like a chunked circle…

    The code without Jetpack activated
    <div class="photo"><a href="/sviluppare-un-team-benefici-e-fasi/"><img src="/wp-content/uploads/2017/03/Nina_Blog.png" class="scale-with-grid wp-post-image" alt="" srcset="/wp-content/uploads/2017/03/Nina_Blog.png 136w, /wp-content/uploads/2017/03/Nina_Blog-50x50.png 50w, /wp-content/uploads/2017/03/Nina_Blog-75x75.png 75w, /wp-content/uploads/2017/03/Nina_Blog-85x85.png 85w, /wp-content/uploads/2017/03/Nina_Blog-80x80.png 80w" sizes="(max-width: 136px) 100vw, 136px" width="136" height="136"></a></div>

    The code with Jetpack activated
    <div class="photo"><a href="/sviluppare-un-team-benefici-e-fasi/"><img src="/wp-content/uploads/2017/03/Nina_Blog.png?resize=136%2C106" class="scale-with-grid wp-post-image" alt="" srcset="/wp-content/uploads/2017/03/Nina_Blog.png?zoom=2&resize=136%2C106 272w, /wp-content/uploads/2017/03/Nina_Blog.png?zoom=3&resize=136%2C106 408w" sizes="(max-width: 136px) 100vw, 136px" width="136" height="106"></a></div>

    So how can I handle with this issue?
    Searching through the function.php file didn’t produced the aspected results…

    Regards

    V

    Btw I forgot to mention the most important thing: Jetpack V4.7.1, WP v4.7.3… sorry -.-‘

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    @k_77 This sounds like a different issue. Could you start your own thread? Could you also post a link to one of the pages where I can observe the issue so I can take a closer look?
    If you want your site URL to remain private, you can also contact us via this contact form:
    https://jetpack.com/contact-support/

    It would also help if you could let me know if you use specific plugins (like a page builder plugin maybe) to build the page where that image is added.

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘4.2.2 – Photon Resizing to Wrong Size’ is closed to new replies.