• Resolved irismoebius

    (@irismoebius)


    Please excuse if a topic on this already exists. The search function doesn’t seem to work (for me) – no matter what word I search for, it always comes up with “no result”.

    I’m trying to optimize my website for speed by setting up a caching tool. I’ve tried a ton of different ones now, but all of them mess up the look of my gallery. I’m displaying a Flickr gallery with photonic, with the Image Lightbox and a justified grid. All caching plugins force the pictures into squares, thereby squashing them.

    Does anybody have experience with how to solve this, e.g. what caching plugins might work or what settings I have to put either in the gallery or the caching plugin? I’d be happy to exclude the gallery page or photonic generally from caching as well. As long as I can optimize the rest of my website, this should already greatly improve speed. I’m afraid I am quite attached to the justified gallery, my photos aren’t really suitable for square thumbnails (and I haven’t tested if this would solve the problem yet either).

    • This topic was modified 6 years, 9 months ago by irismoebius.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    The square thumbnails are resultant from Lazy Loading, not caching.

    There are multiple concepts at play when you are loading a gallery:

    1. Caching of images – I very strongly advocate against this if your source is anything other than WordPress. When you are using image caching, the plugin that you are using will make a copy of the original image to a different location, thereby replicating everything you already have elsewhere. All providers such as Flickr, SmugMug, Google etc. make a living out of serving images out of a content delivery network (CDN) and any performance gains that they provide as a result will far outweigh anything that a cached image on WP will provide. Typically image caching gets triggered if you activate image optimization on plugins like JetPack.
    2. Caching of your page markup – Unlike image caching, this simply keeps a copy of your page’s markup from a point in time in cache, i.e. whatever you see when you do a “View Source” on your page gets stored in the cache, preventing your page from using server resources (such as a call to Flickr to get the image listing for an album). If you are looking to optimize, this is a good one to target under two conditions:
    1. Your source should not be Google. Google issues short-lived URLs, so it doesn’t work with caching.
    2. Your source should be static. If you are adding new images to an album you will not see those in the cached copy, and you will have to regenerate your page cache.
    • Lazy Loading – Unlike the previous two this works in the user’s browser, not in your server. And this is one thing you absolutely cannot use with Justified Grids (or even the Mosaic or Masonry layouts). The reasoning is very simple: a justified grid requires full knowledge of the image’s dimensions before constructing the layout. When you have lazy loading activated you are fundamentally preventing the full dimensions from being determined, and hence the layout computation is incorrect. So lazy loading cannot coexist with a justified grid layout.
    • In your case the culprit is lazy loading, and you will have to figure out if you can prevent targeting certain markup elements using your lazy loading plugin. To wit, when you are using Photonic other non-Photonic galleries / images are left untouched by Photonic behaviour. Along similar lines your lazy loading plugin, if well-designed, should be able to support exclusion of certain images. If you find no such option you have to disable lazy loading altogether.

    Plugin Author Sayontan Sinha

    (@sayontan)

    I am marking this “Resolved” as it looks like this is working on your website now. Please feel free to reopen this thread if you feel otherwise.

    Thread Starter irismoebius

    (@irismoebius)

    Sayontan,

    yes, thank you so much for your detailed answer, I completely forgot to reply :-\
    But this was very helpful! I disabled lazy loading entirely now until I figured out how to exclude the photo or plugin or page.

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

The topic ‘Issues with caching plugins’ is closed to new replies.