It depends on wether the WordPress media library created a smaller version of an image or not. The plugin itself does not create images it will only use them if available.
Technically the plugin uses wp_get_additional_image_sizes() and get_intermediate_image_sizes() to determine which image sizes WordPress generates for uploaded images. Square thumbnails are excluded since they would not work well as transition for opening images. All other image sizes are recorded and for each image the plugin will check if there is file available on the server for the smallest size.
In your case one of the image sizes is 300×200 pixels which will be used for the
data-lbwps-srcsmall attribute of the landscape images. However for the portrait images there is no smaller version with 200×300 pixels, only the intermediate size of 400×533 which may have been created when the masonry gallery was created on the page but which is not registered as one of the official images sizes in WordPress.
I’ll have to check, if the algorithm can be extended to check existing files as well and not only the registered sizes of the media library. However this may affect performance as well since this would mean to scan the folder where the original image is for every available file and check if one of the files represent a smaller version with the same aspect ratio.
Before this change happens, I will add the detected imag sizes in the “Info” tab in the backend with the next update, so you may at least understand why certain “smaller” images are not used at all.
- This reply was modified 3 hours, 40 minutes ago by Arno Welzel.
Thank you for the answer.
my theme created a couple of different sizes of an image. Is it maybe possible to point the lower resolution file. For example to point it to the images size which is loaded already in the masonry? So there is no need to load another image from the server?
Thank you for looking into my problem. Have a nice weekend
Indeed I found an issue with the image sizes check which caused portrait images not to work properly. Release 5.0.20 should to version fix this.