On initial load, all images are lazy. Then when clicking a button to have AJAX fetch the next block of product data, sometimes the images have their data-src rewritten to src and all is well. Sometimes this does not happen. Most of the time, a hard refresh of the page will fix the issue, but not every time.
When it works, it works. If the first fetch works, then any fetches after that work fine. If the first fails, all the rest fail as well.
On initial load, all images are lazy. Then when clicking a button to have AJAX fetch the next block of product data, sometimes the images have their data-src rewritten to src and all is well. Sometimes this does not happen. Most of the time, a hard refresh of the page will fix the issue, but not every time.
When it works, it works. If the first fetch works, then any fetches after that work fine. If the first fails, all the rest fail as well.
Code below: