Для этих шагов:
Используйте сетку для покрытия двух постов и вручную установите ширину этих двух фотографий, например:
[grid]


[/grid]
(Исходный размер каждого изображения — 690×265)
Корневая причина заключается в том, что соотношение сторон миниатюры сильно отличается от соотношения сторон полноформатного изображения, и лайтбокс не справляется с этим, что вызывает мерцание.
Ошибка видна при клике на две изображения ниже:
Запрос на изменение (PR) создан здесь:
main ← small-lovely-cat:fix-lightbox-flicker-img-cropped
merged 11:37PM - 27 Jan 26 UTC
For these steps:
Using a grid to cover two posts, and manually set the width … of these two photos, like:
```
[grid]


[/grid]
```
(The original size of each image is 690*265)
And then click the image to start lightbox, the image flickers, leaving the cropped image at the back, covered by the full sized one.
The root cause of this is that the ratio of the thumbnail differs greatly from that of the full-sized image, and lightbox failed to handle that, causing a flicker.
This commit fix this by adding the logic: If thumbnail has different aspect ratio with the full-sized image, use the full-sized image as the start point of the animation.
**Before:**
https://github.com/user-attachments/assets/4a83374e-3382-4223-82cf-75fa4d1a426f
**After:**
https://github.com/user-attachments/assets/797d7c76-395f-4cbf-a765-6eeb8909b11d
4 лайка
Спасибо за вклад! PR был слит, и мы посмотрим, как всё пойдёт.
3 лайка