Although Lightbox is served via a CDN, it introduces significant overheads. Additionally, images aren’t frequently used on the blog, making it unnecessary to load jQuery and other assets every time. To optimise performance, I’ve implemented a conditional script that checks posts for image links and dynamically loads the Lightbox library only when needed. This ensures resources aren’t loaded unnecessarily on pages without images.