It’s difficult to align images that have very different aspects like 16:9 mixed with 1:1. What sort of alignment did you have? It seems to me that the existing top alignment is about all you can expect with mixed aspects.
@bcworkz, what I mean is that the gallery used to be displayed in a neat grid style with all the image tiles grouped together (regardless of image aspect, the WP gallery used to automatically align them in a ‘Masonry’ layout style) whereas now they are all separate images scattered all over the place – something is stopping the images from being grouped together like they were before and I’ve noticed that it’s happened after the latest WP update
Are your galleries the native [gallery] shortcode type? It doesn’t do masonry layouts by default. I wonder if masonry or a similar jQuery module is being applied. If so, the related script could be using deprecated code. 5.5 has dropped support for deprecated code. You can re-enable support with the jQuery Migrate Helper plugin. Installing and activating it might solve the layout issue.
This is a stop gap measure. The real solution requires the problematic code be fixed.
@bcworkz yes, I’ve installed that but it’s not resolved this problem unfortunately. It is a native gallery as far as I can tell (you can probably guess I am no expert)! However, the gallery is embedded within a Siteorigin layout builder so it might have something to do with this? I can confirm that the gallery definitely used to be displayed in a really nice tiled masonry style layout – otherwise I never would have used it in the first place. Appreciate your efforts to help.
I think you’re right. The layout you see now is the normal gallery layout, but layout can be altered by CSS and scripts. It’s most likely the scripts that are failing, since CSS alone cannot produce a masonry style layout, it requires script logic. The migrate helper plugin has so far helped most people with script problems related to 5.5 upgrade. Sadly, “most” is not everyone.
You might try flushing your browser cache with the helper plugin active. Stale script files can sometimes be rather persistent. If that doesn’t help, I recommend seeking assistance through the dedicated support channel of the layout builder. The experts there are in the best position to help you.
UPDATE: I sought help through the SiteOrigin support forum and someone suggested I try inserting a gallery through the regular WP layout interface and see if the problem persisted… I don’t know why I didn’t think of that, but anyway the problem is still there, so it looks like the isssue is something to do with WordPress and not the theme or layout builder plugin!
I get the following notification from jQuery Migrate Helper — Warnings encountered:
jQuery.fn.toggle(handler, handler…) is deprecated
Searching the forums, it looks like lots of other people are getting these warnings too…
The search for a solution continues!
From the page’s source HTML, it’s apparent to me that the masonry script which alters the default gallery layout is part of your theme. The masonry module itself doesn’t appear to be loaded. I could have easily missed it if it’s rolled into other scripts, but its lack is suspicious. I think your best option now is seeking help through your theme’s support, assuming it’s not SiteGround and you’ve not already done so.
If all else fails, maybe the masonry module could be loaded and initialized through some added custom code.
I think that this issue may have something to do with Jetpack…I have found that the Jetpack ‘Speed up image load times’ function seems to be causing an issue.
EXAMPLE:
Without Jetpack acceleration, images load correctly, but gallery isn’t displaying in the masonry style. With JetPack image acceleration enabled, some image links appear broken but the masonry display works again. (Also: These images are not limited to the ones used in the masonry gallery.)
e.g. Without Jetpack image link points to:
https://www.pawsacrossbritain.co.uk/wp-content/uploads/2020/07/OI000094.jpg
With JetPack image acceleration enabled, image links appear broken:
https://i2.wp.com/www.pawsacrossbritain.co.uk/wp-content/uploads/2020/07/OI000094.jpg?ssl=1
Error on page: Sorry, the parameters you provided were not valid
I am reaching out to Jetpack for assistance but if anyone has found a way to resolve this then I’d appreciate any advice.