Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello guys, hope you all are doing well.
I'm facing an issue with the Empire theme's latest version. I have created a custom colour option as an individual product and fetched that product on click by jQuery Ajax. But when I make an Ajax request and append fetched product HTML to the page, everything works fine except images. Images are not loading due to the lazyload of the Empire theme.
I've tried it without lazyloading in images, and then images are loading but when I use the Empire theme image rendering way, the images are not loading on Ajax's request.
Please help me to solve this issue.
Please check that screenshot for more clarification:
To address the issue with images not loading on Ajax requests due to the Empire theme's lazyloading functionality, we recommend considering an alternative approach. Instead of replacing individual elements via Ajax, we suggest utilizing a section copy method. This involves fetching and rendering entire sections of content, including images, ensuring they load correctly within the theme.
- Your Coffee Tip can create magic in coding ☕✨
- Seeking a Shopify Certified Developer? Contact us Shopify Verified partners
Sadly @MiracleWebsoft sounded like a classic ChatGPT answer. @Developer_Jay, did you manage to find a solution? I'm facing that same issue.