WAIT: Lightbox Bug When using query array loop

Browser: Chrome 110
OS: Windows
URL: https://electrobellpro.com/
Video: Jam

Hi Bricks team,

I’m reporting a bug when using lightbox on an image. As shown in the video, it’s not rendering correctly — it appears to have fill instead of object-fit: contain. For some reason, this only happens with query array.

I’m using query array to fetch WordPress comments.

The only way I could get it to work was by removing the animations and applying object-fit: contain to the image with custom CSS. Otherwise, both the animation and the image break.

Hi Edison,
Thanks so much for your report!

I assume the reason for this is similar regarding what was reported here:

We’ve already implemented a potential solution for this in 2.4 beta-2. However, I’m not sure if that would help in your case, since your images all have different dimensions. That’s most likely the crux of the matter: because you’ve defined the images in an array, they’re treated as “external” images, so Bricks can’t determine the correct image dimensions.

You can see this if you inspect the lightbox: the width and height attributes are “fixed” at 800x600px for every image.

It would be great if you could send us your login credentials and a link to this thread to help@bricksbuilder.io so we can take a closer look at your setup and try to find a solution for this case.

Best regards,
timmse