How to fix layout shift issue caused by product thumbnail slider?

Dear all,

I’m trying to prepare my shopify store for May 2021 and the “core web vitals” Google update.

When I analyse my product pages with the PageSpeedInsights tool, I have a quite high layout shift (>0.22). When I check into details, I see that the product thumbnail slider is causing this layout shift, as you can see on the screenshot below:

I have tried to edit the code and allocate some fixed space to this thumbnail slider with html “height” and “width” attributes, but I failed. Even though I don’t see a layout shift anymore when I refresh the page, the PageSpeedInsights tool still shows the same issue.

Has anyone any idea to resolve this issue?

Thank you for your help