Paste a video, animation, or image link below and get the correctly formatted snippet to drop into your Show Me The Physics pages — videos and animations lazy-load the same way as your fixed pages, and images get a fallback so a broken link never leaves a blank gap.
loadVideosIn() script — check the "One-Time Page Setup" tab if you're not sure your page has it yet.lazy-iframe / data-src pattern already on your pages — it only needs the small lazy-load script block to already be in the page's showSection() function (see "One-Time Page Setup").loading="lazy" just tells the browser to defer offscreen images automatically, which is all they need since they're much lighter. If the image link ever breaks, the onerror fallback swaps in a placeholder with your alt text instead of a broken-image icon.If you're starting a brand-new page (or double-checking an old one), these are the three pieces that make lazy-loading work. Most of your existing pages already have all three.
Goes once in your <style> block.
Goes once inside your existing DOMContentLoaded script, alongside your other helper functions.
Goes inside your showSection() function, right after the section is shown (next to your existing lazy-iframe loading code, if you have one).
Wraps images with consistent spacing. Skip this if your page already has an .img-container rule.