WordPress.org

Support

Support » Plugins and Hacks » Photon breaking some images

Photon breaking some images

Viewing 15 replies - 16 through 30 (of 40 total)
  • @jeremy I just took a look at http://code.svn.wordpress.org/photon/index.php and noticed there’s a 10-second timeout on the fetch_raw_data function. I ran the script on my computer with a higher timeout, and it worked after 18 seconds.

    $raw = fetch_raw_data( $url );
    if ( empty( $raw ) )
    	httpdie( '504 Gateway Timeout', 'We cannot complete this request, remote data could not be fetched' );

    function fetch_raw_data( $url, $timeout=10, $connect_timeout=2 ) {

    So it looks like my server is just too slow! (No surprise there.) I do plan on downsizing most of my images before I upload them in the future, but it’d be nice if the Photon server could be a little more patient with my old machine hosting off of consumer internet.

    I’d love to be in on the solution (or even code it up), if any. Just let me know the best place to discuss it. Maybe the server could wait as long as it is still receiving data and hasn’t passed a certain threshold? It’s cached after the first time, right? Or at least have the client fall back on loading the original server’s version.

    -Kyle

    Plugin Author Jeremy Herve
    Jetpack Mechanic

    @jeherve

    Kyle,

    You’re right; the load time of some of your images seems quite slow.

    We’re currently working on a solution to this problem; we’d like to use an intermediate image size when it’s available, and when the original image is too large. I’ll post again here as soon as we can address the issue!

    bloggista
    Member

    @bloggista

    Newbie here, but I got same problem with photon on certain images, and I found that those with images with filename like http://bloggista.com/wp-content/uploads/2011/02/bald-man-222×250.jpg won’t get displayed (but if you click on it – it fetches this file http://i2.wp.com/bloggista.com/wp-content/uploads/2011/02/bald-man-222×250.jpg and is showing.

    Deleting these images and re-uploading to content won’t work. Try re-naming these images ex. http://bloggista.com/wp-content/uploads/2011/02/bald-man.jpg, re-upload to post and it worked.

    Oh well…

    I found that those with images with filename like http://bloggista.com/wp-content/uploads/2011/02/bald-man-222×250.jpg won’t get displayed (but if you click on it – it fetches this file http://i2.wp.com/bloggista.com/wp-content/uploads/2011/02/bald-man-222×250.jpg and is showing.

    Deleting these images and re-uploading to content won’t work. Try re-naming these images ex. http://bloggista.com/wp-content/uploads/2011/02/bald-man.jpg, re-upload to post and it worked.

    Totally worked for me. I had the same problem.

    We know we should be using a CDN as our server does struggle sometimes when we break a story, and just more speed is good anyway. But we’ve not got round to it.

    So just to see if using Photon would help we turned it on, but it seems to be a bit unreliable at rendering images correctly.

    Some of the time it takes the image – which we optimise and size before uploading to our server – and renders it perfectly:

    New Land Rover Defender will be “…the bollocks, the absolute dog’s bollocks”!

    But – doing things exactly the same way and with an image sized and optimised in exactly the same way – Photon decides to change the size:

    Want the Jaguar XKR-S GT in the UK? Then demand it.

    It does seem using Photon has added a bit of speed (although it would be nice if it also handled CSS, Javascript etc,) but we’re not happy that it seems incapable of rendering images reliably.

    Is there a fix for this, or do we need to turn it off and use a proper CDN?

    Plugin Author Jeremy Herve
    Jetpack Mechanic

    @jeherve

    @carsuk Could you activate Photon for a few minutes, and try the following steps:

    1) Open an affected post in the editor.
    2) Switch to the text tab for the editor.
    3) Reload the page.
    4) Copy the post content into Pastebin: http://pastebin.com/
    5) Paste the pastebin URL here, or send it to us via this contact form:
    http://en.support.wordpress.com/contact/?jetpack=needs-service

    Thank you.

    Jeremy, thanks for your input.

    I’m afraid that with Photon breaking the layout we had to bite the bullet and move over to a full cdn (MaxCDN) which we’ve set up over the weekend and does all we wanted.

    It’s a shame, because Photon looked like it would be a good step, but it has at least pushed us in to doing the whole cdn properly.

    I can tell you that around half of the posts we published with Photon correctly resolved the images at 590px (the body width) but for the rest Photon resized to 400px.

    All the photos are sized and optimised before uploading so it had nothing to do with us selecting ‘medium’ or resizing and in the end we had to give up on Photon to make sure our articles looked right.

    Thanks again for your input.

    Yes, couldn’t there be some easy form where we can submit a url so that the cache is refreshed? Like the google page submit, we put in http://site.com and it should just recache everything under that site.

    It can even be trivial to add the button to the jetpack plugin in wp-admin to apply to the current site/domain.

    Plugin Author Jeremy Herve
    Jetpack Mechanic

    @jeherve

    couldn’t there be some easy form where we can submit a url so that the cache is refreshed?

    If you change the file name, you will cache a new version of the file. That should help.

    Hi Jeremy,

    Any word on my problem (above). Photon was timing out when my server was taking too long to deliver large images. Data was transferring slowly but surely, though.

    Thanks,
    Kyle

    Hi Jeremy,

    We have a similar problem with Photon not showing images.
    We have a grid view of villas on our site, some of the images are not shown with photon activated. In the single page ALL images are not shown.
    So the following occurs:
    This one works:
    http://i0.wp.com/rentalvillasibiza.com/wp-content/uploads/2013/05/360.jpg?resize=370%2C230
    these don’t:
    http://i0.wp.com/rentalvillasibiza.com/wp-content/uploads/2013/05/360.jpg?resize=768%2C568
    http://i0.wp.com/rentalvillasibiza.com/wp-content/uploads/2013/05/360.jpg
    We did have W3TC running but i deactivated that to test some more. Turning Photon off resolves all image problems immediately
    Hope you can shed some light 😉

    Plugin Author Jeremy Herve
    Jetpack Mechanic

    @jeherve

    @kyle No news I’m afraid. If your server cannot deliver the images under 10 seconds, I would recommend that you upload smaller images, until we find a solution to pick some of your resized images when the original image is too large.

    @hioolen All images seem to work for me at the moment. Do you still experience issues?

    nope it seems fine now. The glitch lasted almost the entire day. Any ideas why this could happen? I know our customer will not be pleased with images not showing.
    Do you perhaps know if cloudflare will pick up missing images in it’s cache?

    Thanks!

    Plugin Author Jeremy Herve
    Jetpack Mechanic

    @jeherve

    If it happens again, I would suggest that you clear your browser cache, or try to access the images in a different browser: we didn’t experience any outages that may explain why you couldn’t access images hosted on WordPress.com.

    Do you perhaps know if cloudflare will pick up missing images in it’s cache?

    I’m not familiar enough with Cloudflare to answer that question, I’m afraid. I would suggest that you give it a try.

    We will try that, but we did notice image loss on multiple machines and i allways run my browser cache-less

Viewing 15 replies - 16 through 30 (of 40 total)
  • The topic ‘Photon breaking some images’ is closed to new replies.