WordPress.org

Forums

Jetpack by WordPress.com
[resolved] Jetpack Tiled Mosaic Gallery not loading all images (41 posts)

  1. Mvd
    Member
    Posted 1 year ago #

    Hi everyone,

    I have been struggling with this for a while now and finally posted it here: My site runs with Jetpack plugin enabled and I have the gallery's display as Tiled Mosaic. Sadly enough nearly every gallery fails to load all images. There's always some image missing and instead there is an empty space.

    I thought this had something to do with my theme using some Lightbox on the images but even when I activate the latest Twentyfourteen theme the problem persists. I re saved every post, it just doesn't help.

    When I look in firebug there is an url to the image src element like this:

    src="http://i1.wp.com/www.mydomain.com/wp-content/uploads/..../../little-round-sidetable.jpg?resize=461%2C346

    When I manipulate some of the last digits on that url I finally get the image to show but often in wrong aspect ratio.

    Does anyone know an answer to this? It's very annoying!

    Thanks, Mvd

    http://wordpress.org/plugins/jetpack/

  2. Mvd
    Member
    Posted 1 year ago #

    update:
    when I look up the image url of the missing images directly I get this message from the wp cdn:

    'We cannot complete this request, remote data could not be fetched'

    This is strange cause the image is in that location on my site so there must be a network problem or something..

    Thing is that it's not a temporary thing, it happens for quite some time now.

    Could this have to do with my hosting company seeing this as hotlinking or something?

    Removed hotlinking rules in htaccess, still the problem persists!

  3. Mvd
    Member
    Posted 1 year ago #

    I tried nearly everything; wrote a plugin to rewrite the image url's in the_content without the jetpack CDN prefix (i2.wp.com/).
    Tried javascript to rewrite the image urls on page load (body onload="" and window.onload=function...).

    Nothing helps.

    Does anyone know where the src elements for the gallery images gets prefixed with this CDN bit? And secondly where the style element of the image tag (style="") gets set? (cause that's part of the problem, it gets set to width=0px height=0px.

  4. Mvd
    Member
    Posted 1 year ago #

    Ok, I did actually get some help on stackexchange and wrote a javascript workaround to:
    1) loose the wordpress CDN prefix i2.wp.com/ or i1.wp.com/
    2) fix the cases where the image does not apear cause it's style is set to width:0px; height:0px;

    It's not jQuery cause that snippet didn't work somehow.
    Here's the javascript, place it as the VERY LAST code in the <head> section, just before the </head> tag.
    Here's the code:

    <script type="text/javascript">
    	function ChangeImageSrc() {
    		//tiled-gallery is the class of the container div
            var div = document.getElementsByClassName("tiled-gallery")[0];
    		// get the images inside that tiled-gallery div
            var images = div.getElementsByTagName("img");
            //loop trough the images and change the src and possibly style attribute
            for (var i = 0; i < images.length; i++) {
    			//data-orig-file is where the url of the original image is in the html
                images[i].setAttribute("src", images[i].getAttribute("data-orig-file"));
    			// set the image style if it's width is smaller than 50 (px)
    			// you can change the number
    			if (images[i].width < 50){
                images[i].setAttribute("style", "width:100%;height:100%;");
    			}
            }
        }
    
        window.onload = ChangeImageSrc;
    </script>

    note that when the style is rewritten to 100% width/height the white margins of the tiles disapears, I still have to find out how to fix that. (possibly by doing some ingenious math with the container div's style attribute)

    Hope this helps others!

  5. Mvd
    Member
    Posted 1 year ago #

    even that code didn't work flawlessly so I finally resorted to this codecanyon script:

    http://codecanyon.net/item/jquery-tiles-gallery/2281417

    Witch finally works as a tiled gallery should!

  6. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    *.wp.com are WordPress.com subdomains. They're used to serve images from our Content Delivery Network (CDN) when the Photon module or Tiled Galleries are active. Since the CDN servers are all over the world, loading time from these servers should actually be good, if not better than your own server.

    If the i2.wp.com/ or i1.wp.com/ image URLs return an error on your site, it's most likely because there is an issue with the original image; Photon tried to download and cache it, but failed. It could be because it took more than 10 seconds to download it, or it could be because it doesn't exist anymore.

    Could you provide me with some examples of the broken images so we can take a closer look together? You won't need to use another Tiled Gallery plugin if we manage to solve the issue :)

  7. Mvd
    Member
    Posted 1 year ago #

    Hi Jeremy Herve,

    Thanks for taking interest in my problem, I appreciate it!
    Here's a link to my site link, second page(excerpt galleries are showing with another plugin). When you go back in time (older posts) there's pretty much on every post a gallery with one or two images missing. The problem is that I can get the images straight away with the regular url but the CDN url doesn't work. The second problem is that the style="width:0px;height:0px;" is written to the image inline.

    It's a shame cause I really thought this was the coolest gallery plugin around!

    I think there must be some conflict somewhere, my theme (timeline) used some gallery function but I've ripped that code out.

    Hope you can find something!

  8. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I went back a few pages, but all images seem to be displayed properly on my end.

    Could you copy a few of the image URLs that seem broken, and paste them here so I can take a look?

    Thanks!

  9. Mvd
    Member
    Posted 1 year ago #

    Hi Jeremy, here the whole gallery doesn't apear while it should be there. I hope it's only a browser thing, that would be awesom, (I use Firefox but when I try Chrome I get the same result but only the images are not set to width="0px" height="0px", but slightly larger sizes (but not correct still). Usually the gallery apears finally when I reload the page a couple of times but my visitors might not do that.

    If it's related to my machine what should I do than?

  10. anasfr
    Member
    Posted 1 year ago #

    same with me, after deactivating photon in jetpack plugin its back to normal

  11. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    The images are properly displayed on my end, but they are not aligned properly: something appears to be missing in the bottom row. It's not a missing image though.
    http://i.wpne.ws/TEXK

    I also noticed that you are running another jQuery Tiled Gallery plugin. Could you try to deactivate it and see if it helps?

  12. Mvd
    Member
    Posted 1 year ago #

    Hi Jeremy,

    I deactivated the other tiled gallery (excerpt of gallery) plugin for the page of posts. It doesn't change that images are missing. I also thought this might be platform related so I checked the site out on a windows laptop, same thing (except that the image dimensions -that I checked- where set right, image still missing, that's in IE). Do you have any other ideas about this?

  13. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Could you try switching to one of the default themes for a few minutes, and let me know if it helps?

  14. Mvd
    Member
    Posted 1 year ago #

    Hi Jeremy, did that Switched to twentyeleven and twentyfourteen, both times the galleries got worse, more images appear missing (even ones that loaded before).

  15. Mvd
    Member
    Posted 1 year ago #

    Hi Jeremy,

    I'm out of clues and guess your are to, I'm going to resort to another plugin although I still think your tiled gallery is the best. It just doesn't work reliably on my site somehow. A feature I would strongly recommend though is the ability to switch off the CDN if you use one yourself or don't want to use it, I think that's part of the problem (I know that in theory it should work better than without but it doesn't for me..).

    Good luck with the plugin and I'll keep an eye on it!

    Thanks for the support!

  16. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    If the problem is not caused by your theme, it could be a conflict with another one of your plugins, or an image hotlinking protection service that could be active on your server.

    If you don't find any plugin conflict, then I'm afraid I'm out if ideas, indeed.

  17. Mvd
    Member
    Posted 1 year ago #

    Hi Jeremy,

    I checked the plugins before, besides it happens on two separate sites (only thing in common is the server).
    So I checked the server as well, no there is no block or hotlink protection, not in the .htaccess either.

    To me it seems like the two problems are related, the image dimensions aren't set correctly cause the image fails to load (-in time).

    ....

  18. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    To me it seems like the two problems are related, the image dimensions aren't set correctly cause the image fails to load (-in time).

    I thought so too, but looking at your site, it seems you've now disabled Tiled Galleries and Photon but still experience the same dimension issues with your new Tiled Gallery plugin. Do you experience the same problem on your end?
    http://i.wpne.ws/TNgN

  19. Mvd
    Member
    Posted 1 year ago #

    Hi Jeremy,

    This screenshot is actually the look of the gallery! :)
    I must admit it's not as nice as your plugin but it loads all images (and on all galleries), there are just four images in this gallery, more would look better.

  20. Mvd
    Member
    Posted 1 year ago #

    Hi Jeremy Herve,

    I unfortunately got more and more errors on my site also from different plugins and scripts, it seems that my hosting's cpu is not sufficient for my needs, maybe this has to do with the Tiled Gallery error as well. Shortly I'll go over to special wordpress hosting and I'll post here if that solves the problem!

  21. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Hi! Just wanted to chime in that most of the work for the Tiled Galleries is done on the WordPress.com end, and not on your server; the images are resized and loaded from our servers. The main part where your server is involved is in the act of sending the images to the WordPress.com servers, like Jeremy explained above. In any case, I look forward to hearing more, after reading through this thread!

  22. weeeweeeweee
    Member
    Posted 1 year ago #

    hello all,
    I am experiencing exactly the same problem as Mvd when I try to use tiled galleries. Although I'm totally not as good in coding or as knowledgable as you guys I thought i could share my experiences in how I get things to work, so maybe this can point you guys in the right direction.

    I found this problem to be happening mostly when multiple images are uploaded/added at the same time. For example when i use ftp to upload all the images to the server, and then the add from server plugin, then i get a lot more of these errors. Also when i upload the images from within wordpress more then one at a time then it happens. But when i upload them one by one, then 9 out of 10 times it is ok.

    As a solution to getting a image that is not displaying to display, I just go to the media, edit media, rotate image CW save it, rotate it CCW again, save it again and then it works.

    Some of the images I use are quite big, 4000x6000, since that's how they come out of the camere and I only have an android tablet with me so resizing is not that easy. So they sometimes are 9-10 Mb, maybe this causes the images, not to get to the server within the 10 seconds-margin that i read above.

    hope this helps, because it is a lot of work at times...

    grtz Karel

  23. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    weeeweeeweee: If you upload via FTP, then yes, that would happen as Jetpack/Photon don't know about the existence of the files and thus they aren't sent to the Photon CDN, so that makes sense. And as you suspect, that huge size for an image is the source of the problem; your server needs to be very fast for us to be able to get it within 10 seconds, and even then, I suspect we'll always have difficulty with a file that size. The rotation that you do causes WordPress and your server to resize and resave the images, which then gets sent to Photon.

  24. betholsoncreative
    Member
    Posted 1 year ago #

    If you're ready to give up on this problem (one which I was also having) I just turned off the Jetpack Mosaic galleries and installed "Justified Image Grid" by Firsh (bought it from code canyon). It has a super easy option to simply "turn wordpress galleries into mosaic galleries". Everything worked perfectly after that.

    Not sure how that affects loading time and all that if you're using the Photon option to boost load speeds but I personally found that with or without photon the wp galleries didn't work.

    Though there's still always that annoying nagging thing that the bug that caused the original problem is still out there.... good luck!

  25. Mvd
    Member
    Posted 1 year ago #

    Hi all, here's what happened when I finished moving hosting to the quicker wordpress hosting package of my host; The Images load now nearly all but they remain way to small or (sometimes) with a broken image icon.

    This moving didn't help on part of the gallery much.

  26. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Hi Mvd,

    You don't appear to have Photon or Tiled Galleries on at the moment, but I did notice that there is an animation on the images in your gallery now; whatever is causing that animation may be affecting the Tiled Gallery as well. If you want to troubleshoot this further, please turn Tiled Galleries back on. Thanks!

  27. Mvd
    Member
    Posted 1 year ago #

    Hi, Thanks for the reply!

    I've just turned tiled galleries back on!

  28. Mvd
    Member
    Posted 1 year ago #

    Hi, I think you meant the effect that comes with the gallery plugin I use instead, zoom on hover. Not hearing from you so I have deactivated tiled gallery again!

  29. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Hi Mvd, I'm sorry I wasn't able to get to your reply quick enough. If you want, maybe you could provide me with login credentials so I can try to turn on and off the Tiled Galleries when I can? If that's good for you, then please contact us at http://jetpack.me/contact-support/ and I'll get back to you. Make sure to link to this thread if you do so. Thanks!

  30. Mvd
    Member
    Posted 1 year ago #

    Hi Richard,
    Just added the support ticket! Hope to hear from you soon!
    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic