As FranchesoaFranchesca explains the problem seems to arise when there are strong contrasting colors in the grid. In your case: Dark images and white background.
This page describes how the problem can be dealt with when styling tables:
"Avoid using dark and heavy grids".
Another post I found discussing this (and other) optical illusion(s) states the same answer:
The Hermann grid illusion will not work if there is a low contrast between the colours involved in the grid. As a sidenote, this is why Excel has light blue cells with a white background: there is not enough contrast between the light blue and the white colours to confuse the visual system, so the illusion does not appear.
Try considering a different color for the background, like a soft gray or blue to ease the contrast. Easing the color on the images will also help you if that is an acceptable solution.
Hope this helps