Get object-position pictures from CMS

Hi there,

I could really use your help.

I’ve created an image-field and an “object-position” field in the CMS. I want to create a collection list with the images from the CMS and apply per image the given object-position from the CMS.

With some custom code and adding an ID to the image, I’ve managed to get it working for the first item, but all the other items use the same object-position as the first item.

Could someone help me out? See my site Read-Only-link, where I recreated the problem.

Thanks in advance!

Here is my site Read-Only:

@bearlybrave your custom code affects 1 ID that is shared with all your image. Thats the reason why all the images has the same object position.

Try removing the current Image and change custom code to

Screen Shot 2022-05-13 at 01.30.17

  object-position: (dynamic);
<img src="(dynamic)" class="image" id="(dynamic)"/ >
1 Like

@dennyhartanto Thank you so much, you’re a lifesaver! :hugs: And also thanks for the fast reply. Have a wonderful day!