aFarkas/lazysizes ? reverse-engineered prompt
Reverse engineered prompt
Build me a lightweight lazy loading library for images, responsive images, iframes, and scripts that works just by adding a class and data attributes to markup.
I want it to feel fast, work without any setup, and load things only when they are about to come into view. It should handle normal images, srcset and picture based responsive images, and automatically figure out sizes when possible. It should also keep working when content changes because of scrolling, CSS effects, carousels, infinite lists, or JavaScript updates.
Please include a simple demo page that shows the common ways to use it, like basic images, responsive images, and iframe embeds. Add a couple of optional plugins or extensions if that fits naturally, but keep the main experience simple and easy to drop into any site.
Make sure it works well for SEO, loads the important stuff early, and stays smooth even with lots of images. If you need to look up current browser behavior or docs online, go ahead.
Are you gonna build this?
make sure you review the code using coderabbit