[Bug] Can't load an image into a gallery

To the devs here, there is a bug that prevents images from being shown in a gallery when fitting the image.

To reproduce this:

  • add an image to a collection as a URL link
  • put a gallery in a repeater
  • connect the gallery to the image URL found in the collection
  • go in settings, and choose to “fit” the image.

None of the images load.

Is this known? Is there a workaround? I’m getting really frustrated

“placeholder image” - Do you mean gallery?

Yes, a gallery that is used as a placeholder for dynamically loaded images in a repeater.

I’m sure you are aware of the workaround of using a gallery rather than an image in order to set the image to “fit” within the boundaries of the gallery size. However, it seems doing so on dynamically loaded images doesn’t work.

P.S: Post updated

Yes. I use this workaround and it doesn’t happen to me (but I populate the gallery in the repeater by code, not via the editor).
So it probably happens in some specific conditions.

Could you let me how the gallery can be populated using code? If so, does that mean all the elements in the repeater need to be disconnected an re-connected programmatically? (which is fine, I only have 4-5 elements)

You don’t have to connect every thing by code.

$w("#repeater" ).onItemReady(($item, itemData, index) => {
    $item("#gallery1").items = [{ "type": "image", "src": itemData.image }];
})

(and of course wrap it in $w.onRead() and dataset.onReady())

Thanks for the reply! Sadly, even when binding the images that way, using “fit” breaks the display of the images and they don’t show. Strange because they are there… When clicking on space where the image is meant to be, the lightbox shows up with the image in it.
Any other ideas maybe?

Bump. Is it really not possible to fit an image within a frame in repeaters?