• Resolved dougienisbet

    (@dougienisbet)


    When I like to a zenfolio gallery using (e.g.) shortcode:

    [djngal type='zenfolio' view='photosets' object_id='285187592' login_name='dougienisbet' layout='masonry']

    everything works fine, except that it’s slow. I suspect this has more to do with zenfolio than photonic or WordPress.

    I experimented with the limit parameter, and as I expected, this seemed to speed up display if the limit was, say, around 12. However, the lightbox viewing also respects the 12 photos displayed, rather than the entire gallery. That’s what I expected, and is no doubt WAD.

    I’m trying to work out a simple way of linking to a zenfolio gallery but without a loading overhead. Are there any options that would make a difference?

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

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

    (@sayontan)

    The 3 non-vanilla layouts (Justified Grid, Masonry and Mosaic) have a feature called “Tile Size”. Generally this is set to be the same as the “Main Image Size”. You could set it to be a smaller size; this will not affect the resolution of the images shown in the lightbox. Since you are displaying things in a masonry layout with 3 columns, you could really do with an image that is, say 400px wide. Currently your photos are around 1100px wide, and picking a smaller size will cause the net load on each image to go down to 13% of the current size (since each side is reducing to 4/11 of its current dimension). This translates to a huge saving in terms of the total bandwidth consumed.

    Another option to consider is to display fewer photos, but set a more parameter. That will show a button at the bottom to load more photos. The new photos, when loaded, automatically get added to the lightbox.

    So, this should speed things up considerably:
    [djngal type='zenfolio' view='photosets' object_id='285187592' login_name='dougienisbet' layout='masonry' tile_size='...' more='Load More Photos']

    Thread Starter dougienisbet

    (@dougienisbet)

    Thank you for responding so quickly.

    Do you mean thumb_size (not tile_size)? I tried tile_size and it doesn’t render thumbnails (see examples below), but I’ve had some success using your suggestions.

    Examples: https://www.katsura.uk/photonic-test-1 to https://www.katsura.uk/photonic-test-5

    The last one works well.

    Thread Starter dougienisbet

    (@dougienisbet)

    I misread the information about the thumb_size parameter on https://aquoid.com/plugins/photonic/zenfolio/photosets/ and had given it a px value (which seemed to work). I’ve tried changing it to ‘2’, example on https://www.katsura.uk/photonic-test-6/

    Thread Starter dougienisbet

    (@dougienisbet)

    On a hunch I changed tile_size= to just size= and results have been promising.

    https://www.katsura.uk/photonic-test-8/

    Plugin Author Sayontan Sinha

    (@sayontan)

    I think more than anything else you are reaping the benefits of “Load More”.

    The right parameter is tile_size, not thumb_size (which works for the square or circular thumbnail layout), or size (which is not a recognized Photonic attribute, and so will have no impact).

    How are you generating your galleries? If you are using the gallery wizard (via the “Add / Edit Photonic Gallery” button in the Classic Editor, or the Photonic block in Gutenberg), it will give you the options upfront without your having to fiddle with things too much.

    These are the various settings you can use for the tile size (the wizard will show all of these to you in a dropdown):

    • same – Same as Main image size
    • 2 – Small image, upto 400 × 400px
    • 3 – Medium image, upto 580 × 450px
    • 4 – Large image, upto 800 × 630px
    • 5 – X-Large image, upto 1100 × 850px
    • 6 – XX-Large image, upto 1550 × 960px
    Thread Starter dougienisbet

    (@dougienisbet)

    I generally avoid the wizard because it’s very slow for me. I think when it’s communicating with zenfolio it takes a long time, and if I want to search for a specific gallery or photo the search results returned, and thumbnail size, are often not useful. I forget though that it provides the shortcode, so it’s good for a first attempt, then, once I have the shortcode, I can make quick adjustments to that.

    I’ve found that if I don’t copy the supplied shortcode when it’s presented though, I can’t retrieve it later. I’ve tried switching between classic/Gutenberg and using the code editor, but the shortcode is gone forever, it’s more something like:
    <!-- wp:photonic/gallery {"shortcode":"{\u0022type\u0022:\u0022zenfolio\u0022,\u0022view\u0022:\u0022photosets\u0022,\u0022object_id\u0022:\u00221426030542440078856\u0022,\u0022login_name\u0022:\u0022dougienisbet\u0022,\u0022more\u0022:\u0022more photos\u0022,\u0022main_size\u0022:\u00222\u0022,\u0022tile_size\u0022:\u00222\u0022,\u0022layout\u0022:\u0022random\u0022}"} /-->

    I understand now what you mean about tile_size – I was confusing it with the resolution, so it’s no surprise that a value of 400 didn’t work! I’m experimenting with 2,3,4 and it’s looking much more promising.

    Plugin Author Sayontan Sinha

    (@sayontan)

    I generally avoid the wizard because it’s very slow for me. I think when it’s communicating with zenfolio it takes a long time, and if I want to search for a specific gallery or photo the search results returned, and thumbnail size, are often not useful.

    The speed of the wizard is getting remedied in the next release – it is going to get a considerable boost. Obviously, the screen that fetches content from Zenfolio will still be a bit slow, but everything else has been streamlined.

    For the results, are you not able to filter the search results by typing into the search field? That is often pretty quick if you have to find a specific photoset.

    I’ve found that if I don’t copy the supplied shortcode when it’s presented though, I can’t retrieve it later. I’ve tried switching between classic/Gutenberg and using the code editor, but the shortcode is gone forever, it’s more something like:

    The “code editor” is a useless abomination that shouldn’t have ever been included with Gutenberg. I would have dearly liked the old-style “Text Editor” that shows up when you disable Gutenberg, and I had even raised it as a question during the early days of Gutenberg, and several people were unhappy with the toolbar being gone for the “Code Editor”.

    The thing is, once you have made a block from something, you are pretty much stuck editing the block in Gutenberg itself, so you cannot manipulate it as you would a shortcode from the Classic Editor. Basically, a block is not a shortcode when it comes to editing, though in Photonic’s case they display the same content.

    So, unless you really like some feature of Gutenberg, a much smarter approach to construct a page with a Photonic gallery would be to use the Classic Editor and launch the wizard. In the “Text” mode of the Classic Editor, you can select the shortcode and open it for editing using the wizard.

    Thread Starter dougienisbet

    (@dougienisbet)

    If I’m searching for something straightforward then the search is good, but sometimes I want to do the equivalent of browse and in that case it’s easier to hop into my zenfolio account and identify the photos directly.

    Incidentally, I noticed that using the wizard the object_id is different, (e.g. 1426030542440078856 with wizard, 285187592 if taken directly from URL). Both work fine.

    I don’t really find the Gutenberg editor adds anything for me so I’ll try sticking with the Classic Editor next time I use the wizard and can therefore continue accessing the shortcode.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Best practice for speed optimization (zenfolio)’ is closed to new replies.